功能强大的Server.Transfer

Server.Transfer可以把页面上的一些数据传到其他的页面,而response.redirect只转入页面。

看看server。transfer的用法:

A:页面代码: <input type='<%# type() %>' name="tp_id[]" id="tp_id[]" value='<%#Eval("id") %>' /> cs代码: protected void ImageButton_tp_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Server.Transfer("ROYcms_TP.aspx"); }

ROYcms_TP_aspx.cs中也可以处理来至a页面的所以数据的请求: if (Request["tp_id[]"] != null) { tp_id_z = Request["tp_id[]"].Trim().Split(','); } if (Request["tp_id"] != null) { tp_id_z = Request["tp_id"].Trim().Split(','); }

posted @ 2009-03-16 09:41  zxlin25  阅读(227)  评论(0编辑  收藏  举报