473,806 Members | 2,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Difference !Page.IsPostBac k and !IsPostBack

111 New Member
Hi all,

What is the differenct between

"if (!Page.IsPostBa ck) " and "if(!IsPostBack )"

Thanks.
Jan 22 '08 #1
5 2139
kenobewan
4,871 Recognized Expert Specialist
Gee this wouldn't have anything to do with the page reference would it?
Jan 22 '08 #2
jhaxo
57 New Member
Hi all,

What is the differenct between

"if (!Page.IsPostBa ck) " and "if(!IsPostBack )"

Thanks.
No difference. IsPostback is the same is this.IsPostBack and this is a page.
Jan 22 '08 #3
kenobewan
4,871 Recognized Expert Specialist
No difference. IsPostback is the same is this.IsPostBack and this is a page.
Except it is possible to receive a null reference error without, so they are not exactly the same.
Jan 23 '08 #4
jhaxo
57 New Member
Except it is possible to receive a null reference error without, so they are not exactly the same.
ok. if you are a page, I have never gotten a null reference error. When does it happen ? this is null?
Jan 24 '08 #5
kenobewan
4,871 Recognized Expert Specialist
ok. If you have a web form and you do not provide full referencing, best practice, you may receive a missing reference error. Suggest you try different sampling techniques. HTH.
Jan 24 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

7
10229
by: Lubo¹ ©lapák | last post by:
Hi, I have a login page and after click on button Login I check username and password and if it is correct, i want load page, which was there before Login page. How can I do it? In javascript it is simply <script language="javascript">window.history.back();</script> but How can I do it in C# code? Please help. Thanks Lubos
2
1089
by: Jensen bredal | last post by:
Hello there, I have my aspx page loaded but when i click a link on the page, then IsPostBack is always false. How can this be? The link is: <a id=x href=deaulf.aspx?id=1 runat=server> </a>
3
4793
by: Joey | last post by:
Hi, I'm trying to add a default item to my listbox but when I do it tells me that it's not defined, could someone tell me the syntax I need to use to get the listbox control to display a default item? I have tried the following: lstStates.Items.Insert(0, new ListItem("By State","0"))
4
1697
by: TJ | last post by:
Hi, There is one aspx web page that contains usercontrol. In aspx page and usercontrol , there is each submit button... Here is what I want... I want to process something depending on each page's IsPostBack property... For exmple.... when I click the submit button which is in usercontrol, ASPX page should
1
1969
by: Joey | last post by:
I am currently working on a (file-system) website in C# in VS2005. I am programming counters for the different webpages. I wrote a class and enum with functionalities exposed like... Counter.Hit(PageCounter.Home) ....and then I put it in the Page_Load section and within the if(!Page.IsPostBack) block on my web form. I can see that during debugging that the !Page.IsPostBack block fires
4
6006
by: Angel Of Death | last post by:
How come if I have a server side callback function, the IsPostBack value is always true , when I check it in the Page_Load ?
6
15858
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 that is derived from the master page (default.aspx) i have code that i dont want to run after the login button is pressed so i used the standard if(!Page.IsPostBack) {}
6
8433
by: Seb | last post by:
Hello, Is there the IsPostBack command in ASP (not ASP.net) ? Or How can I detect a refresh in a ASP page ? Thanks Sebastien
5
5033
by: Hans Kesting | last post by:
Hi, Is there good information about the asp.net page lifecycle in combination with dynamically loaded controls? Or on "how to build dynamic controls"? I keep hitting problems where values are not available at the moment I need them. Current problem: In a dynamically loaded ascx there is a dropdown. Based on the selected value (reloading an existing value or responding to a
0
9719
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9597
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10372
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9187
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5682
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4329
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3851
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.