Click here to Skip to main content
16,011,805 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
on button "PostBackUrl" property written below line to pass value .Can any one tell me how can I pass the value
PostBackUrl="http://localhost:62784/checkout.aspx?value=txtcurrentuser"
Posted
Updated 7-Feb-12 2:14am
v2
Comments
Syed Salman Raza Zaidi 7-Feb-12 8:22am    
What do you want? your question in not clear
SAM_India 7-Feb-12 8:26am    
Hi
Thanks for response,I am passing two values from one page to other using PostBackUrl .In button click event how can I use PostBackUrl to pass more than 1 value to another page
PostBackUrl="http://localhost:62784/checkout.aspx?value=txtcurrentuser"

You may use any of below ways to transfer values

  • Query Strings
  • Cookies
  • Session variables
  • Server.Transfer
  • Post Back URL

Passing data/parameters/values from one aspx page to another aspx page[^]
Passing Values from One Page to Another Page – ASP.NET[^]
 
Share this answer
 
Comments
Espen Harlinn 8-Feb-12 14:40pm    
5'ed - Good suggestions :)
For Multiple values in Query string you have to make postbackurl like


http://localhost:62784/checkout.aspx?value=txtcurrentuser&value2=somevalue

ie separate values with &
 
Share this answer
 
Comments
adee.sidz 8-Feb-12 8:28am    
accurate
you can use Session

for Example

in code behind
C#
Session["username"] = this.txtUserName.Text
Session["password"] = this.txtPassword.Text



then if you want to retrieve to other page

for example

you want to pass the value to string x,y and make some condition

C#
string x = Session["username"].ToString().Trim();
string y = Session["password"].ToString().Trim();

if ( x != string.Empty && y != string.Empty )
{
 /*Do Something*/
}
 
Share this answer
 
v4

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