473,385 Members | 1,372 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.

IsPostBack property misbehaving!



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>

The click does in fact cause a postback(the page is refreshed) but the
debugging shows that the IsPostBack
property is always false...

Any help will be appreciated

Nov 18 '05 #1
2 1073
A refresh is not the same thing as a PostBack. A PostBack occurs when form
data has been submitted and then the page can "post" that data "back" to
you.

Change your hyperlink to a server button and run this code in your page load
event:

If not IsPostBack then
'First time page is rendering
response.write("Welcome")
Else
'Data has previously been submitted
response.write("Welcome Back")
End If

"Jensen bredal" <je***********@mimosa.com> wrote in message
news:OS**************@TK2MSFTNGP09.phx.gbl...


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>

The click does in fact cause a postback(the page is refreshed) but the
debugging shows that the IsPostBack
property is always false...

Any help will be appreciated

Nov 18 '05 #2
Thank you!
"Scott M." <s-***@nospam.nospam> wrote in message
news:OD**************@TK2MSFTNGP10.phx.gbl...
A refresh is not the same thing as a PostBack. A PostBack occurs when form data has been submitted and then the page can "post" that data "back" to
you.

Change your hyperlink to a server button and run this code in your page load event:

If not IsPostBack then
'First time page is rendering
response.write("Welcome")
Else
'Data has previously been submitted
response.write("Welcome Back")
End If

"Jensen bredal" <je***********@mimosa.com> wrote in message
news:OS**************@TK2MSFTNGP09.phx.gbl...


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>

The click does in fact cause a postback(the page is refreshed) but the
debugging shows that the IsPostBack
property is always false...

Any help will be appreciated


Nov 18 '05 #3

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

Similar topics

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: 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...
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...
4
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...
6
by: RA | last post by:
btnAdd_Click does not get hit; if I have IsPostBack check in Page_load. If I don't have IsPostBack check; I am able to debug through btnAdd_Click. If I don't look for IsPostBack then it...
5
by: David Lozzi | last post by:
Hello, I have an interesting issue, so bear with me as I try to explain. I have a datalist posing as tabs for my application. And as each tab is clicked, a placeholder is then populated with the...
5
by: elmemo | last post by:
So I wrote a web user control in some .ascx file, and it gets rendered in a ItemTemplate column in the EditItemTemplate tag inside a DetailsView element. So far so good. The web user control I...
5
by: BM | last post by:
I have a question that seems like it should have a simple answer, but I can't seem to find it by searching... Anyway, I'm trying to capture the IsPostBack event when I select an item within an...
6
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
Yesterday Visual Studio gave me a strange error both at compiletime and at designtime that had no obvious connection to anything I had changed recently. After some effort tracking down the problem...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.