I have an ASP.NET webforms application in which I want to show a popup only if a user is not logged in. The event that shows the popup is triggered by a button click, the code behind then shows the modal popup if the user is not logged on.
The problem is that the page gets refreshed (posted back), and only then the popup gets shown. What I want to achieve is that the popup show without the page being refreshed.
Any ideas?
Thanks,
Tom
'I want the popup to show without the page being refreshed'
Here's how to make a submit button that only submits when a user is logged in, (by adding client-side validation). The button will either:
- provide a popup for a not-logged-in user and do nothing else
or
- submit/postback for a logged-in user.