Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all I have a text box and two buttons in a form. Each button will redirect current page to the corresponding given page. But i need the text box values also to both the forms. I used form method as post but it can be accessed in one form only. How to do this help me?
Posted
Comments
enhzflep 15-Nov-12 6:46am    
So, you want to take a single input (the textbox on the form) and siaply it in two separate and distinct places? Why not do what any other app would do an either (a) store the value in a session variable or (b) store it in an sql table?

Hard to advise further without any idea what the data is, or what it's intended use is.

If I'm not mistaken, the other option of course, is to store it in the user's machine using the functionality provided by HTML5's LocalStorage object.

It really depends on a bunch of stuff as to which is the better approach.

1 solution

you can pass text box value as query string if it is web form
 
Share this answer
 
Comments
enhzflep 15-Nov-12 7:52am    
Okay, sure. That sorts out the first form. Now then, what about the second one?
Red Chocolate 15-Nov-12 23:22pm    
my second form is to display the details according to the input given in the textbox
Dhaval Bhattji 21-Nov-12 7:10am    
on second form load event you have to extract data from query string and then populate data accordingly

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