Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How Can I sent veritable One Page to another page in asp.net C# 2010
Posted
Comments
[no name] 16-May-13 4:56am    
I think it's variable not veritable don't do spelling mistakes while posting questions.

I think you mean to say variable rather than veritable?if this is so,refer to link below to get idea about encrypting query strings.

Encrypting Query Strings
 
Share this answer
 
Response.Redirect("YourPage.aspx?xyz=YourVariableValue");

Now once redirected to your page, in the page_load event you can retrive the passed value from xyz object like below:

C#
if(Request["xyz"] != null)
{
     string myString = Convert.ToString(Request["xyz"]); //If the datatype of the value is a string.
}
 
Share this answer
 
its simple
using
Response.Redirect("pagename.aspx?id=2")

and u can get that value using
string a=Request.QueryString["id"];
at pagename.aspx
 
Share this answer
 
Response.Redirect("YOurUrl.com?movie="+Okkadu);
MovieList.cs

string movieName=Request.QueryString["movie"].toString();

Movie.cs
 
Share this answer
 
v2
Using Querystring

Querystring is a day old mechanism to pass values across pages. The main advantage of this method is it is very simple. However, disadvantages are the values are visible in the address bar and you can not pass objects this way. This method is best suited when you want to pass small number of values that need not be secured from others. In order to implement this method you will follow these steps:

For Detailed Info Visit Blog
Create the web form with controls
Provide some button or link button that posts the form back
In the click event of the button create a string that holds URL for another
Add control values to this URL as querystring parameters
Response.Redirect to another form with this URL

private void Button1_Click(object sender, System.EventArgs e)
{
string url;
url="dest.aspx?CustomerName=" + TextBox1.Text + "&EmailAddress=" +TextBox2.Text;
Response.Redirect(url);
}

In the dest.aspx page load you can get the values passed by using

private void Page_Load(object sender, System.EventArgs e)
{
Label1.Text=Request.QueryString["CustomerName"];
Label2.Text=Request.QueryString["EmailAddress"];
}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900