Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have a requirement to pass a hidden field value in one page to other page on button click and we have few validation on click event. I should not use query string concept and session variable concept. when I implementing with server.transfer I am getting error because my button is in update panel.Is there any alternative method to achieve this requirement?

Thanks In Advance,
Ramakrishna.
Posted

Hi,

you can use any one of the following method..

Cookies

SET :

C#
HttpCookie cookName = new HttpCookie("Name");
cookName.Value = "Pandian";

GET :

C#
string name = Request.Cookies["Name"].Value;


------

Application Variables

SET :

C#
Application["Name"] = "pandian";

GET :

C#
string Name = Application["Name"].ToString();
 
Share this answer
 
v2
Comments
Thanks7872 6-Nov-14 4:02am    
You should always point out the reference : http://stackoverflow.com/a/14956219/2645738
Have you checked this post :

Passing value from one page to another using Hidden Field in Asp.Net Using C#[^]

Pls have a look at it.

If still not able then follow one of the alternative steps in the article:
http://www.codedigest.com/Articles/ASPNET/351_How_to_Pass_Values_from_One_Page_to_Another_in_ASPNet.aspx[^]
 
Share this answer
 
 
Share this answer
 

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