要在网页传递单个或者多个参数到CS代码也得方法:
在GridView添加新列 - HyperLinkField
DataNavigateUrlFormatString="SingleHeatReport.aspx?
heatId={0}&treatmentCount={1}"
Text="详细信息">
在cs代码中通过queryString即可访问
例:protected void Page_Load(object sender, EventArgs e)
{
string heatId = Request.QueryString["heatId"].ToString();
string treatmentCount = Request.QueryString["treatmentCount"].ToString();
txtHeatId.Text = heatId;
txtTreatmentCount.Text = treatmentCount;
}
这样就把之前页面的参数通过textbox显示。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8780503/viewspace-1033428/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8780503/viewspace-1033428/