2011年11月26日 星期六

ASP.Net常用參數傳遞方法

傳送參數:

response.write("*.aspx?id=" & this.DropDownList1.SelectIndex & "&id1= ...")


打開新的視窗並傳送參數:

response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")


接收參數:

string a = Request.QueryString("id");
string b = Request.QueryString("id1");

沒有留言:

張貼留言