Monday, March 26, 2012

Passing Variable Across Secure Pages

Hey Bros:

I'm new to asp.net obviously, and am working on trying to put together my first website. I need help passing variables across multiple forms then trying to query a sql database based on the data which is passed.

What I have is
page one, datalist with a button when clicked will redirect to a page in a directory protected using forms authentication, user will be redirected to log in, once logged in the are redirected to the original destination page.

page two, will show the items, and details of the page which corresponds to the button the visitor originally choose.

I know I basicly have to create something to grab the value on the original page, and then on the destination page create something to grab the value, then perform an SQL statement agianst the value which was orignally grabbed from the first page. I just cannot find code which I can understand to do this. Any help would be greatly appreciated!Well one step at a time will take you far places...

You can easily preserve the data in a form item by enabling viewstate on the form by adding the following syntax enabledviewstate="true" This uses more system resources though and should not be enabled for form items that do not need it.

You were saying that you want to pass data from here to there etc... Well in asp.net you really do not have to and can code your entire program into one asp.net which eliminates passing values to and from. Ever hear about asp.net panels? A good book I would recommend is ASP.NET UNLEASHED by: Stephen Walther, if you are just starting out... I will track this thread to see if you have any other Q's...

0 comments:

Post a Comment