Hi,
I have the following requirement wherein I have a webform with webcontrols in it . While the original requirement is to database operations with it the new requirement is to along with inserting in db the webform's html needs to be sent to a different server.
The new requirement needs me to send the webforms resulting html to be sent to a different webserver(essentially a https:// web site).
Right now I have the page output(HTML) as a stirng but not sure to redirect to another server because when I use the following code: the control goes to the other server(obviously) but I need the control back to the current site to do some operations like displaying message to user etc.
Can anybody advise me to do how to go about it
Thanks in advance
I have the following requirement wherein I have a webform with webcontrols in it . While the original requirement is to database operations with it the new requirement is to along with inserting in db the webform's html needs to be sent to a different server.
The new requirement needs me to send the webforms resulting html to be sent to a different webserver(essentially a https:// web site).
Right now I have the page output(HTML) as a stirng but not sure to redirect to another server because when I use the following code: the control goes to the other server(obviously) but I need the control back to the current site to do some operations like displaying message to user etc.
VB.NET:
Dim hRequest As HttpWebRequest = WebRequest.Create(url)
hRequest .Method = "POST"
hRequest .ContentType = "application/x-www-form-urlencoded"
Dim sRequestStream As Stream = hRequest .GetRequestStream()
Dim postBytes As Byte()
Dim e As New System.Text.ASCIIEncoding
postBytes = e.GetBytes(sHtmlString
sRequestStream.Write(postBytes, 0, postBytes.Length)
sRequestStream.Close()
HttpContext.Current.Response.Redirect(URL, True)
Thanks in advance
Last edited by a moderator: