IsPostBack property misbehaving!

  • Thread starter Thread starter Jensen bredal
  • Start date Start date
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
 
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
 
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
 
Back
Top