471,338 Members | 1,127 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

Page.IsPostBack

Tim
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.

Jul 21 '05 #1
3 1872
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).
"Tim" wrote:
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.

Jul 21 '05 #2
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
}
"Tim" <Ti*@discussions.microsoft.com> wrote in message
news:4B**********************************@microsof t.com...
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.

Jul 21 '05 #3
Tim,

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

Cor
Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Tim | last post: by
5 posts views Thread by nly | last post: by
2 posts views Thread by Pravin | last post: by
6 posts views Thread by DotNetGruven | last post: by
14 posts views Thread by Mike | last post: by
reply views Thread by Managed Code | last post: by
6 posts views Thread by anthonykallay | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.