Just not working.....
-
Hi, I am trying to post to another server using ASP.Net. I got this code from Microsoft web site: Dim myReq As HttpWebRequest = _ WebRequest.Create("http://www.contoso.com/") I have put this code in "Button1_Click" event. It just does not transfer to the site specified. I have added the Net namespace. Is something still missing? Many thanks.
-
Hi, I am trying to post to another server using ASP.Net. I got this code from Microsoft web site: Dim myReq As HttpWebRequest = _ WebRequest.Create("http://www.contoso.com/") I have put this code in "Button1_Click" event. It just does not transfer to the site specified. I have added the Net namespace. Is something still missing? Many thanks.
-
The code you showed doesn't do anyting, it just creates an object. What is it that you expect the code to do? --- b { font-weight: normal; }
Shouldn't this redirect to the web site "http://www.contoso.com" as specified, along with the information it needs to post in the form? First, I was just trying to make sure that it redirects to above url, then post all variables info. I need to post to another server url from ASP.Net. Thanks. Vani
-
Shouldn't this redirect to the web site "http://www.contoso.com" as specified, along with the information it needs to post in the form? First, I was just trying to make sure that it redirects to above url, then post all variables info. I need to post to another server url from ASP.Net. Thanks. Vani
VK-Link wrote:
Shouldn't this redirect to the web site "http://www.contoso.com" as specified, along with the information it needs to post in the form?
No, it shouldn't. Where is that specified? You can't do redirection with the HttpWebRequest object. Take a look at the examples in the documentation[^]. --- b { font-weight: normal; }
-
Shouldn't this redirect to the web site "http://www.contoso.com" as specified, along with the information it needs to post in the form? First, I was just trying to make sure that it redirects to above url, then post all variables info. I need to post to another server url from ASP.Net. Thanks. Vani
-
VK-Link wrote:
Shouldn't this redirect to the web site "http://www.contoso.com" as specified, along with the information it needs to post in the form?
No, it shouldn't. Where is that specified? You can't do redirection with the HttpWebRequest object. Take a look at the examples in the documentation[^]. --- b { font-weight: normal; }
I tried this after trying the documentation you had sent me - Dim HttpWReq As HttpWebRequest = _ CType(WebRequest.Create("http://www.contoso.com"), HttpWebRequest) Dim HttpWResp As HttpWebResponse = _ CType(HttpWReq.GetResponse(), HttpWebResponse) ' Insert code that uses the response object. HttpWResp.Close() Samething - it doesn't redirect to "http://www.contoso.com" - is something amiss above? thanks so much!
-
I tried this after trying the documentation you had sent me - Dim HttpWReq As HttpWebRequest = _ CType(WebRequest.Create("http://www.contoso.com"), HttpWebRequest) Dim HttpWResp As HttpWebResponse = _ CType(HttpWReq.GetResponse(), HttpWebResponse) ' Insert code that uses the response object. HttpWResp.Close() Samething - it doesn't redirect to "http://www.contoso.com" - is something amiss above? thanks so much!
-
Of course it doesn't redirect, I already told you that you can't do that using a HttpWebRequest object. --- b { font-weight: normal; }
-
Using a HttpWebResponse as well, after HTTPWebRequest - still wouldn't work, you say? Thanks.