Here's an example on how to pass Multiple querystrings in the page..
Page1
protected void Button1_Click(object sender, EventArgs e)
{
string strName = "VINZ";
string strAddress = "CEBU";
string strDate = DateTime.Now.ToShortDateString();
Response.Redirect(string.Format("TestNasad2.aspx?param1={0}¶m2={1}¶m3={2}",strName,strAddress,strDate));
{
string strName = "VINZ";
string strAddress = "CEBU";
string strDate = DateTime.Now.ToShortDateString();
Response.Redirect(string.Format("TestNasad2.aspx?param1={0}¶m2={1}¶m3={2}",strName,strAddress,strDate));
}
The on Page2 you can get each values this way below
protected void Page_Load(object sender, EventArgs e)
{
if ((Request.QueryString["param1"] != null && Request.QueryString["param2"] != null) && Request.QueryString["param3"] != null)
{
string name = Request.QueryString["param1"];
string address = Request.QueryString["param2"];
string date = Request.QueryString["param3"];
}
}
{
if ((Request.QueryString["param1"] != null && Request.QueryString["param2"] != null) && Request.QueryString["param3"] != null)
{
string name = Request.QueryString["param1"];
string address = Request.QueryString["param2"];
string date = Request.QueryString["param3"];
}
}
0 comments:
Post a Comment