Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Server Redirect Issue


Server Redirect Issue

Author
Message
gvi
gvi
Forum God
Forum God (420 reputation)Forum God (420 reputation)Forum God (420 reputation)Forum God (420 reputation)Forum God (420 reputation)Forum God (420 reputation)Forum God (420 reputation)Forum God (420 reputation)Forum God (420 reputation)

Group: Forum Members
Posts: 2, Visits: 2
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.

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)

Can anybody advise me to do how to go about it

Thanks in advance


GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search