Page.IsPostBack

G

Guest

I have dropdown list in Login page. The data is adding twice because the
Page_Load event is executing twice. But I am checking !Page.IsPostBack
property. First time the value for '!Page.IsPostBack' is 'true'. When it goes
for second time it is not setting to 'false'. Please remember the '!' before
the property. Which is means that still it is not recognizing that the page
is loaded.

Basically the Login page is redirecting from the Authenticate page.

Any help please, thanks in advance.
 
G

Guest

It is not a post back if the page is redirected from another page.

From the login page, you should be submitting to login page (itself).
 
S

Scott M.

It sounds like you are using C#, yes? Well, first off, the Page_Load event
only fires once for each page request so the problem must be your syntax.
Have you tried this

if(IsPostBack)
{
// This is a postback situation
}
else
{
// This is not a postback situation
}
 
C

Cor Ligthert

Tim,

You mean that you have the values twice in your dropdownlist.
This is weird, can you show some code.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top