IsPostBack property misbehaving!

J

Jensen bredal

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
 
S

Scott M.

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
 
J

Jensen bredal

Thank you!
Scott M. said:
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
 

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

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top