Post Back

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to write my first ASP.net page and am having a little trouble, please help. I have a Page_Load sub that looks like this
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
If Page.IsPostBack The
Response.Write("This is a post back."
Els
Response.Write("This is not a post back."
End I

In the .aspx page I have a <form runat="server"

I have a button with an onclick event to validate data. If the data is OK the

document.form1.submit(

For some reason the Page.ispostback is true when first loading and on post back. Any ideas

Thanks, Don Norris, Sirron Software Corporatio
 
Can you post all your code please?

Cheers
Ken


: I am trying to write my first ASP.net page and am having a little trouble,
please help. I have a Page_Load sub that looks like this:
: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
: If Page.IsPostBack Then
: Response.Write("This is a post back.")
: Else
: Response.Write("This is not a post back.")
: End If
:
: In the .aspx page I have a <form runat="server">
:
: I have a button with an onclick event to validate data. If the data is OK
then
:
: document.form1.submit()
:
: For some reason the Page.ispostback is true when first loading and on post
back. Any ideas?
:
: Thanks, Don Norris, Sirron Software Corporation
:
 
Got it to work. Evidently if you right-click and refresh its not the same as completely redisplaying the page

Thanks
 
Back
Top