Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Differencing between post and coding a post
Message
De
26/02/2013 18:44:22
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Differencing between post and coding a post
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01566995
Message ID:
01566995
Vues:
55
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform