Saturday, March 24, 2012

Passing variables between sub procedures

I am currently coding in VB.Net.

I have used the folloiwng code to retrieve a variable value from a sending aspx page in the recieveing aspx page within the Sub Page_Load procedure:

Dim UsernameRecd as String
UsernameRecd = Context.Items("Username")

Which works fine.

However within the recieving aspx page l have another sub procedure based upon a click event on a button web control which also needs the above variable value but l cannot seem to retian the above value once the user clicks the button.

Is there a way to retrieve the variable value agian or do l have to store (and retrieve) the value once the page loads?

Help.

Parm.Store (and retrieve) the value

MajorCats

0 comments:

Post a Comment