Page.IsPostBack

G

Guest

To make !Page.IsPostBack to work, do I need to set any properties at page
level or in the config files(Web, machine) or aspx files. Because code in
under the !IsPostBack is executing twice and adding data twice to dropdown
list control.

any help please..Tim
 
P

Peter Rilling

Are you doing any redirects? Postback only happens when the form is posted
using a submit command.
 
G

Guest

No I am not redirecting, this page is getting called from authentication
page. There are links on this page to go to other page.
 
G

Guest

Hi Peter,

Actually this page is getting redirected from other authentication page,
does it causes the problem.
 
S

SerhaD Ýnanlý

Tim, I tried for you both single Page and a redirected Page from a Login one
but I didn't get any error ! So Redirecting doesn't cause twice adding.
Are you sure you did populate DropDownList just in (!Page.IsPostBack) block.
Maybe you did it from Properties --> Items collection before//
 
G

Guest

The Login page is getting redirected from Authentication page. I have put
the code under Login Page_Load event in !Page.IsPostBack blcok.

Do I need to chenk 'EnableViewState', 'AutoPostBack' of dropdown,
'AutoExecWireup' in config files properties. Please let me know.
 

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