on the target page, set
<%@ Page EnableViewStateMac="false" %>1. <form runat=server onsubmit="this.action='target.aspx';">or2.
Server.Transfer("target.aspx",true);otherwise, you need to use Request.Formsee
http://www.dotnetbips.com/displayarticle.aspx?id=79
<%@ Page EnableViewStateMac="false" %>1. <form runat=server onsubmit="this.action='target.aspx';">or2.
Server.Transfer("target.aspx",true);otherwise, you need to use Request.Formsee
http://www.dotnetbips.com/displayarticle.aspx?id=79
解决方案 »
- 求解 母版页 控件 被自动修改
- 名称以无效字符开头。处理资源 'http://localhost:1069/Service1.asmx' 时出错。
- 异常详细信息: System.Data.SqlClient.SqlException: 对象名 'tc_information' 无效。----请高手解决
- Eval数据绑定变态事例求解
- SQL语句问题,请教
- 大家讨论邮件下载后要不要存储在数据库里,不存好像都从邮件服务器读不能解决邮件是否是新邮件的问题 (200分)
- 如何判断根节点,父节点,子节点?如何分别便利它们的根节点,父节点,子节点得个数?
- asp.Net下如何用Add方法把<br/>加入asp控件里?
- 如何把数据导入到excel?
- 怎样不用Application和Session统计在线人数???
- 关于远程forms身分验证。
- 关于中文文件名是乱吗!!!!!!!!!!!!!!!!!!!!!!!!
(object sender, System.EventArgs e)
{
Server.Transfer("anotherwebform.aspx");
}
Destination WebForm
private void Page_Load
(object sender, System.EventArgs e)
{
//create instance of source web form
WebForm1 wf1;
//get reference to current handler instance
wf1=(WebForm1)Context.Handler;
Label1.Text=wf1.Name;
Label2.Text=wf1.EMail;
}
可是当我不经过webform1提交而直接进入webform2时会出现错误
怎样可以让我直接进入webform2时不出现错误呢。
try
{
WebForm1 wf1;
//get reference to current handler instance
wf1=(WebForm1)Context.Handler;
Label1.Text=wf1.Name;
Label2.Text=wf1.EMail;
catch
{
}