I want to pass values from one page to another after clicking on a button and get the values in the page_load routine of the called page.
Can someone tell me how to do this?
Presently my code looks something like this:
Coding of the button click event
I have declared a hidden field on page 1 and called it hidMerchantName, in the click event I am doing the following:
hidMerchantName.Value = dMerchantName.Text
Server.Transfer("~/Statements.aspx", True)
Now on page 2 I want to be able to get the value of hidMerchantName
If you guys also have a better way of passing values please let me know
Hi,
Read this:
http://steveorr.net/faq/PassValues.aspx and also this:
http://odetocode.com/Articles/421.aspx
There are many articles that target your question. I suggest you check out the article below:
Passing values from one page to another
Just go to following link:
http://dkuldeep.blogspot.com/2006/01/posting-to-other-pages-aspnet-20.html
just assume txtName as hidMerchantName.
Regards
Kuldeep Deokule
0 comments:
Post a Comment