all groups > vj# > march 2004 >
You're in the

vj#

group:

How do you detect a Postback in JSharp?


How do you detect a Postback in JSharp? Burton G. Wilkins
3/15/2004 7:06:11 AM
vj#:
Dear Authorities

I am new to J#. I would like to create an ASP web application in J#. What is the syntax for testing whether a form load is being processed as a result of a Postback

In Visual Basic ASP.Net one would use the following code to determine if the form load firing was due to a Postback

If Me.IsPostBack The
..
Els
..
End I

If in C#, one would use the following code to determine if the form load firing was due to a Postback

if (this.IsPostBack == true

..

els

..


Now how then do I accomplish the same in J#. I'm guessing the difference is only a change in syntax, but I don't know what it is. Could you please advise

Sincerely

Burton G. Wilkins
RE: How do you detect a Postback in JSharp? mikegreonline NO[at]SPAM microsoft.com
3/22/2004 6:41:39 PM
Hi Burton,

This is a bit tricky. Remember that all properties in J# have get and set
methods. So you would you code like the following:

if (this.get_IsPostBack() == true)
{
// .. put your code here
}

I hope this is helpful.

Michael Green
Microsoft Developer Support
AddThis Social Bookmark Button