Jimbo99999
asked on
ASP.Net - Help translating code in Pade_Load event
Good Day Experts!
I am back on my journey to learning ASP.Net. Currently, I am a VB.Net programmer.
I have attached a text file with code that is in the Page_Load event for the Login.aspx of the website.
Can you help and translate what is happening in the code? Also, "If Not Page.IsPostBack Then"...will it ever be Page.IsPostBack and not run the code? Also, "If Not Request.Cookies("myCookie" ) Is Nothing Then"...will the cookies ever not be nohting?
Thanks,
jimbo99999
I am back on my journey to learning ASP.Net. Currently, I am a VB.Net programmer.
I have attached a text file with code that is in the Page_Load event for the Login.aspx of the website.
Can you help and translate what is happening in the code? Also, "If Not Page.IsPostBack Then"...will it ever be Page.IsPostBack and not run the code? Also, "If Not Request.Cookies("myCookie"
Thanks,
jimbo99999
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent, thanks for the explanation. My next step of working through the code I put a breakpoint on the first line behind the login button. After entering my username and password and I click the Login button...to my surprise the first line of code that is executed is in the Page_Load event of the Login.aspx! So, once I am in the website I hit the Logout button and same thing...to my surprise the first line of code that is executed is in the Page_Load event of the Login.aspx! I can't figure out why it happens and where in the code it tells it to go back to the Page_Load event of the Login.aspx page.
Do you have any thoughts that might help me understand?
Thanks,
jimbo99999
Do you have any thoughts that might help me understand?
Thanks,
jimbo99999
ASKER
Excellent...thanks for the help.
Yes. The first time a page is requested is not a post back. Clicking a button or interacting with some other control on the page (typically) triggers a post back.
Sure.