Skip to content Skip to sidebar Skip to footer

Pass Value From One Page To Another Using Javascript

I have two pages as Parent.aspx and Child.aspx in my asp.net web application. The values obtained from parent.aspx need to pass to child.aspx code behind page. The redirect from pa

Solution 1:

Check out ASP.NET QueryString Usage or any other resources on ASP.NET Query String access. A full example follows.

On the client side:

window.open ("http://www.yourwebsite.com?empid=somethin&PIN=somethinglese","mywindow");

On the server side (in code behind):

string empid;
string PIN;

if(Request.QueryString.Count != 0)
{
    empid = Request.QueryString["empid"];
    PIN = Request.QueryString["PIN"];
}

Solution 2:

Why not using a session or something similar?

Then in the page load event of ur child page , check that session if not null, then retrieve the data.


Post a Comment for "Pass Value From One Page To Another Using Javascript"