Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a login control on payment page, if user logs in, i want to show them the payment options i.e. payment by existing card, but if they are not, they would enter all the card details.

Problem: when user hits login button, in that refresh, i want to show the payment on existing card option, but it doesn't happen.

Login related details are in a session, and i am checking session variables on (!Ispostback).

For the first time, when page loads, session variables are empty so that section is skipped. When user logs in, page loads, (!Ispostback) section is skipped, and login control's load executes giving values to login session variables. At this point, first even if i refresh the page, i wont get into the (!Ispostback) section, second i really need to show payment on existing card as soon as user hits login and page comes back...

Any ideas on how to do it?
Posted
Updated 27-May-11 5:49am
v2
Comments
Sergey Alexandrovich Kryukov 27-May-11 11:37am    
Tag it first! APS.NET? What?! this is important.
Please don't tell me "one can see it is ASP.NET from the text". Expert need to see right tags before reading the text. You're the one who is interested the most.
--SA
cproject123 27-May-11 11:59am    
Its tagged as C#, asp.net...what do u want me to tag it as?

1 solution

You can use Page_Init()
 
Share this answer
 
Comments
cproject123 27-May-11 13:32pm    
Checking (Request.UrlReferrer!=null) on login page and string Redirectto = Convert.ToString(Request.UrlReferrer); does the job...:)

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