Howdy,
I want to open a url sending POST values.
How would this be possible using this function?
Thanks,
Hi Jorge,
that sample is in C# but it´s quite simple so I am sure you will be able to transfer that concept to VB.net.
Basically the idea is to have a default.aspx processing and storing the values in a way that the Wisej
application that is not loaded yet can post process them.
To test it please open HtmlPageTest.html and see how the form posts the data to default.aspx.
default.aspx forwards the data to your final Wisej application.
Here you can process it in Application.Browser.UserData and do all further coding with the data that is required.
Hope that helps.
Best regards
Frank
Jorge,
please take a look at the WebRequest class.
Find some sample e.g. here:
https://stackoverflow.com/questions/6108531/how-to-send-a-post-in-net-vb
Best regards
Frank
Hum.
I know this is offtopic, but if it’s possible to give some help.
So I have the code below, but how to make it open on a new browser window/tab?
Dim s As System.Net.HttpWebRequest
Dim enc As System.Text.UTF8Encoding
Dim postdata As String
Dim postdatabytes As Byte()
s = System.Net.HttpWebRequest.Create(“https://host.pt/phpmyadmin/”)
enc = New System.Text.UTF8Encoding()
postdata = “pma_username=root&pma_password=xxxxxxxxx&db=mysql&server=1”
postdatabytes = enc.GetBytes(postdata)
s.Method = “POST”
s.ContentType = “application/x-www-form-urlencoded”
s.ContentLength = postdatabytes.Length
Using stream = s.GetRequestStream()
stream.Write(postdatabytes, 0, postdatabytes.Length)
End Using
Dim result = s.GetResponse()
Hi Frank,
Well, I made some progress (i think).
So in the load of my login form, i can catch the query string values, using this (or other code)
For Each key As String In Application.QueryString.AllKeys
MessageBox.Show(String.Format(“{0}={1}”, key, Application.QueryString(key)))
Next
BUT, if i want to send post values instead of GET (query string) to the app, without using the login form, using a separated form, just for this interconnection.
That is: Going to send values in POST, that i’ll process and display JUST XML to read on the other side.
How would this be “achievable”?
Hi Jorge,
if I understand you correctly you want to process some data sent by Post to your Wisej application ?
If that´s the case I can you provide you with a sample how you can achieve this.
If not, please try to specify what you are trying to achieve.
Thanks in advance.
Best regards
Frank
Please login first to submit.