asp.net Server.Transfer asp.net中的参数传递:Context.Handler 的用法

页面跳转传参。

如果不是通用的跳转可以通过,在原始页面定义对象保存数据

跳转的目标页面可以:

SourcePage page=(SourcePage)Context.Handler;
//获取源页面的对象。

通用的跳转,可以使用url传参也可以使用cookie传参,当前其他方式也是可以的。比如Application,session等。

Server.Transfer("AA.aspx?UserId=" + userId + "&roleId=" + _roleId + "&CName=" + System.Web.HttpUtility.UrlEncode(channelName));

参考:ASP.NET——context.Response.Redirect重定向

地址:https://blog.csdn.net/shang_0122/article/details/103211082

标题:asp.net中的参数传递:Context.Handler 的用法

标题:ASP.NET中Server.Transfer用法

猜你喜欢

转载自www.cnblogs.com/Tpf386/p/12022560.html
今日推荐