开发者

accessing post data passed through web browser control -winforms

开发者 https://www.devze.com 2023-01-29 17:18 出处:网络
I\'m developing a winforms application, in which I have a web browser control, where I have to open certain web page based on the menu item clicked. This is how I\'m calling the web page in app

I'm developing a winforms application, in which I have a web browser control, where I have to open certain web page based on the menu item clicked. This is how I'm calling the web page in app

System.Text.UTF8开发者_JAVA百科Encoding encoding =  new System.Text.UTF8Encoding(); 
string postData = "username=xyz";
string header = "";
webBrowser.Navigate(url, "", encoding.GetBytes(postData), header);

How I can access postData values in the webpage?


If the page at url is also an ASP.Net page, then you can access it by:

String Username = Request.Form("Username");
0

精彩评论

暂无评论...
验证码 换一张
取 消