Click here to Skip to main content
15,902,938 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: patching a program Pin
Dave Kreskowiak29-Jun-06 7:45
mveDave Kreskowiak29-Jun-06 7:45 
QuestionWindow Service Pin
nitin_ion29-Jun-06 1:45
nitin_ion29-Jun-06 1:45 
QuestionPGP Pin
punam3029-Jun-06 1:10
punam3029-Jun-06 1:10 
AnswerRe: PGP Pin
Dave Kreskowiak29-Jun-06 4:39
mveDave Kreskowiak29-Jun-06 4:39 
QuestionPre and Post build steps Pin
PaulPrice29-Jun-06 1:07
PaulPrice29-Jun-06 1:07 
AnswerRe: Pre and Post build steps Pin
Duncan Edwards Jones29-Jun-06 1:26
professionalDuncan Edwards Jones29-Jun-06 1:26 
AnswerRe: Pre and Post build steps Pin
Kevin McFarlane30-Jun-06 0:22
Kevin McFarlane30-Jun-06 0:22 
Question[2005] HTTP:POST form emulation - don't even know where to start? Pin
Duncan Edwards Jones28-Jun-06 23:53
professionalDuncan Edwards Jones28-Jun-06 23:53 
I have an application that is supposed to post data to a servlet (possibly written in java?) by using HTTP:POST

The servlet wants a form filled in which has two text fields and a file upload field e.g.

<form id="ServletTest" method="post">
    <input id="Username" name="Username" type="text" /> 
    <input id="Password" maxlength="100" name="Password" type="text" />
    <input id="theFile" name="theFile" type="file" />
    <input id="SubmitButton" type="submit" value="submit" />
</form>


Unfortunately the servlet is not yet developed, so I need to emulate this behaviour to test my code.
When it is created I will be using something like:-

Dim webReq As WebRequest = WebRequest.Create(My.Settings.ServletURL)
With webReq
    .Method = "POST" 'set the request method to POST
    .ContentType = "multipart/form-data"
End With
Dim newStream As Stream
Try
    newStream = webReq.GetRequestStream()
Catch exPV As ProtocolViolationException
    My.Application.Log.WriteException(exPV)
    Return False
    Exit Function
Catch exW As WebException
    'Pass this exception on to the caller to decide what to do with it,
    'as it may indicate a temporary problem
    Throw
Catch ex As Exception
    My.Application.Log.WriteException(ex)
    Return False
    Exit Function
End Try



How would I create an application that my code can run against to post this form to?

'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
QuestionMscomm and draw chart Pin
codeadair28-Jun-06 22:44
codeadair28-Jun-06 22:44 
AnswerRe: Mscomm and draw chart Pin
Dave Kreskowiak29-Jun-06 1:49
mveDave Kreskowiak29-Jun-06 1:49 
GeneralRe: Mscomm and draw chart [modified] Pin
codeadair29-Jun-06 15:06
codeadair29-Jun-06 15:06 
GeneralRe: Mscomm and draw chart Pin
Dave Kreskowiak29-Jun-06 16:39
mveDave Kreskowiak29-Jun-06 16:39 
GeneralRe: Mscomm and draw chart Pin
codeadair29-Jun-06 18:09
codeadair29-Jun-06 18:09 
GeneralRe: Mscomm and draw chart Pin
Dave Kreskowiak30-Jun-06 0:50
mveDave Kreskowiak30-Jun-06 0:50 
GeneralRe: Mscomm and draw chart Pin
codeadair30-Jun-06 1:06
codeadair30-Jun-06 1:06 
GeneralRe: Mscomm and draw chart [modified] Pin
Dave Kreskowiak30-Jun-06 3:51
mveDave Kreskowiak30-Jun-06 3:51 
GeneralRe: Mscomm and draw chart Pin
codeadair3-Jul-06 2:07
codeadair3-Jul-06 2:07 
GeneralRe: Mscomm and draw chart Pin
Dave Kreskowiak3-Jul-06 17:32
mveDave Kreskowiak3-Jul-06 17:32 
GeneralRe: Mscomm and draw chart [modified] Pin
codeadair3-Jul-06 17:41
codeadair3-Jul-06 17:41 
GeneralRe: Mscomm and draw chart Pin
Dave Kreskowiak4-Jul-06 5:49
mveDave Kreskowiak4-Jul-06 5:49 
GeneralRe: Mscomm and draw chart Pin
codeadair4-Jul-06 14:54
codeadair4-Jul-06 14:54 
QuestionError when installing in a XP machine Pin
Arunag28-Jun-06 22:41
Arunag28-Jun-06 22:41 
AnswerRe: Error when installing in a XP machine Pin
fredy66628-Jun-06 23:42
fredy66628-Jun-06 23:42 
GeneralRe: Error when installing in a XP machine Pin
Arunag29-Jun-06 0:20
Arunag29-Jun-06 0:20 
GeneralRe: Error when installing in a XP machine Pin
fredy66629-Jun-06 0:29
fredy66629-Jun-06 0:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.