如何在C#.net中更改HttpWebRequest的地址 [英] How to change the address of the HttpWebRequest in C#.net
问题描述
大家好,
我的代码如下
string url =http:/ /localhost:2002/Application/Newpage.aspx;
HttpWebRequest requestIP =(HttpWebRequest)WebRequest.Create(url)
i需要加载网址。
但是自动将默认页面作为主页。< br $>
requestIP.address =http:// localhost:2002 / Application / Default.aspx
i需要更改此requestIp.address = url;
但它显示错误,因为requestIP是只读
Hi All,
I have code as below
string url="http://localhost:2002/Application/Newpage.aspx";
HttpWebRequest requestIP = (HttpWebRequest)WebRequest.Create(url)
i Need given url to be loaded .
But automatically it took the default page as a home page.
requestIP.address="http://localhost:2002/Application/Default.aspx"
i need to change this requestIp.address=url;
but it shows error as requestIP is Read only
推荐答案
请参阅 MSDN [ ^ ]
这篇关于如何在C#.net中更改HttpWebRequest的地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!