Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Differencing between post and coding a post
Message
From
26/02/2013 18:44:22
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Differencing between post and coding a post
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01566995
Message ID:
01566995
Views:
57
I have this:
            ' Prepare Web request
            loHttpWebRequest = System.Net.HttpWebRequest.Create(cLoginUrl)
            loHttpWebRequest.Method = "POST"
            loHttpWebRequest.KeepAlive = True
            loHttpWebRequest.ContentType = "application/x-www-form-urlencoded"
            loHttpWebRequest.ContentLength = loByte.Length
            loHttpWebRequest.CookieContainer = loCookieContainer
This sends a post request to a page by code. On the server side, this is recognized as a post:
            ' If this is a post
            If oRequest.ServerVariables("REQUEST_METHOD") = "POST" Then
                lPost = True
            Else
                lPost = False
            End If
The problem I am facing is to find a way to differenciate between a post from code, such as the above, and a post made by the user on a form from the Web site.

Is there some kind of HttpWebRequest property I could use to initialize and recognize that on the server side where this property would never be received when someone is posting a form on the Web site?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform