473,385 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Page.IsPostBack

Tim
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
Nov 16 '05 #1
5 2390
Are you doing any redirects? Postback only happens when the form is posted
using a submit command.

"Tim" <Ti*@discussions.microsoft.com> wrote in message
news:8D**********************************@microsof t.com...
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

Nov 16 '05 #2
Tim
No I am not redirecting, this page is getting called from authentication
page. There are links on this page to go to other page.

"Peter Rilling" wrote:
Are you doing any redirects? Postback only happens when the form is posted
using a submit command.

"Tim" <Ti*@discussions.microsoft.com> wrote in message
news:8D**********************************@microsof t.com...
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


Nov 16 '05 #3
Tim
Hi Peter,

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

"Peter Rilling" wrote:
Are you doing any redirects? Postback only happens when the form is posted
using a submit command.

"Tim" <Ti*@discussions.microsoft.com> wrote in message
news:8D**********************************@microsof t.com...
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


Nov 16 '05 #4
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//
"Tim" <Ti*@discussions.microsoft.com> wrote in message
news:DA**********************************@microsof t.com...
Hi Peter,

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

"Peter Rilling" wrote:
Are you doing any redirects? Postback only happens when the form is posted using a submit command.

"Tim" <Ti*@discussions.microsoft.com> wrote in message
news:8D**********************************@microsof t.com...
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


Nov 16 '05 #5
Tim

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.
"SerhaD Ýnanlý" wrote:
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//
"Tim" <Ti*@discussions.microsoft.com> wrote in message
news:DA**********************************@microsof t.com...
Hi Peter,

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

"Peter Rilling" wrote:
Are you doing any redirects? Postback only happens when the form is posted using a submit command.

"Tim" <Ti*@discussions.microsoft.com> wrote in message
news:8D**********************************@microsof t.com...
> 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


Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Andre | last post by:
Hi, This is 'test.htm' --------------- <form name=totd> <input name="ud" type="hidden" value="" > </form>
3
by: Tim | last post by:
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'...
5
by: Tim | last post by:
I have block of code adding values to dropdown list under if (!Page.IsPostBack) { adding items } else { refreshing data }
5
by: nly | last post by:
Page.IsPostBack Property "The Page_Load subroutine runs EVERY time the page is loaded. If you want to execute the code in the Page_Load subroutine only the FIRST time the page is loaded, you can...
2
by: Pravin | last post by:
Hi, I have a doubt that how does ASP.NET find out whether the page is accessed for the first time or the page is due to a post back event, and then set the IsPostBack property ? Any ideas. ...
6
by: DotNetGruven | last post by:
I've got a page that does a search... There is an ImageButton on it that allows the user to reset the search. The Click Handler for the button clears out the Data and then redirects to the same...
14
by: Mike | last post by:
I have a routine that i only want to execute if a variable is set to Y. The routine is getting some information on the screen then redirecting to a new page. How can i passed a variable to the...
0
by: Managed Code | last post by:
Hi all, I've got a DropDownList for the connection string in a master page. Transitioning between content pages causes it to reset to the first value. Under what conditions and where should I...
6
by: anthonykallay | last post by:
Hi there, I dont this this a bug but i cant get my head around it.. I have a master page that has a login control on it, to log in i press the button and the page posts back, however on the page...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.