asp及asp.net的urlencode问题
我想在asp中加一个链接,指向asp.net网页,但asp.net的网址是经过HttpUtility.UrlEncode变形和HttpUtility.UrlDecode变回的,而asp的server.urlencode却产生不了和HttpUtility.UrlEncode一样的编码,请问有没有解决办法
补充:原来asp.net的是"web.aspx?str="+HttpUtility.UrlEncode(str)
和HttpUtility.UrlDecode(Request.QueryString["str"].ToString().Trim())
而asp的是"web.aspx?web.aspx?str="+server.urlEncode( server.URLpathencode(str))
asp.net提交端为:"web.aspx?str="+ HttpUtility.UrlEncode( str,System.Text.Encoding.GetEncoding("gb2312"))
asp.net接收端为:str= HttpUtility.UrlDecode(Request.QueryString["str"].ToString().Trim(),System.Text.Encoding.GetEncoding("gb2312"))
其中str为需要传递的变量
相关文档:
asp.net(C#)字符串加密
2010-03-12 09:59
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;//Cryptography密码术
namespace DAL
{
......
'--------------------------------------------------------------
'ASP版HashMap实现
'该实现存储数据为有序数据,类似Java中的LinkedHashMap
'--------------------------------------------------------------
Class HashMap
dim arr()
dim arr_len
'构造函数
private Sub Clas ......
在Web开发程序中,往往由于种种原因,客户会多次操作页面导致数据冗余或不一致, 在ASP.NET AJAX出现之前可以通过对__dopostback()的调用等方法也可以防止页面多次提交。
在ASP.NET AJAX中的页面客户端中有一个叫onInitializeRequest的事件,它在页面初始化之前触发,可以对页面的提交事件进行控制,并且可以调用该事件参 ......
数据绑定控件比较(Reapter\DataList\GridView\DatailsView\FormView):
1.插入功能方面:
DetailsView和FormView具有插入功能,其它控件没有
2.模板
DataList\FormView\Repeater三种必须编辑模板,而
GridView和DetailsView只有在将列转换成模板列以后才会出现各种模板.
3.自动分页功能
GridView ,DetailsView和FormView ......
刚刚 看到这么一个问题,这里也做个标记:http://topic.csdn.net/u/20080411/14/7b0f9da5-0413-4149-91e9-72c3df3018a3.html?seed=327251592
第一种方式:
//在Visual Studio 2008中调试通过
testPop_Page.aspx:主页面ASPX代码
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  ......