By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,946 Members | 1,600 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,946 IT Pros & Developers. It's quick & easy.

Post Back

P: n/a
Don
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

Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Can you post all your code please?

Cheers
Ken
"Don" <an*******@discussions.microsoft.com> wrote in message
news:2F**********************************@microsof t.com...
: 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
:
Nov 18 '05 #2

P: n/a
Don
Got it to work. Evidently if you right-click and refresh its not the same as completely redisplaying the page

Thanks
Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.