Post Back

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
 
K

Ken Schaefer

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
:
 
G

Guest

Got it to work. Evidently if you right-click and refresh its not the same as completely redisplaying the page

Thanks
 

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

Top