日期:2014-05-19  浏览次数:20437 次

数值传送
小弟是新手,想问一下两个页面之间怎么进行数值传送?
请说得详细点,谢谢~~

------解决方案--------------------
发送(a.aspx):
Response.Redirect( "b.aspx?ID=123 ");

接收(b.aspx):
int ID = -1;
if (Request.QueryString[ "ID "] != null)
{
ID = int.Parse(Request.QueryString[ "ID "]);
}

------解决方案--------------------
或者
Server.Transfer( "b.aspx?ID=123 ");


int ID = -1;
if (Request[ "ID "] != null && Request[ "ID "] != string.Empty)
{
ID = int.Parse(Request.QueryString[ "ID "]);
}

------解决方案--------------------
传值有几种类型!
一般有通过session,application,cookie,以及上面的参数传值.
还有通过实体类也可以达到传值的作用!
------解决方案--------------------
2楼是post
4楼是get

------解决方案--------------------
楼上说的都对 也可以用Session传对象
------解决方案--------------------
网上介绍一大把,baidu搜索下:
http://xj520zq.web19.hzfwq.com/e_tech/aspx/2006-06-15/5027.html

http://zhidao.baidu.com/question/5453145.html