Can any one help me on how to pass parameters along with url, that redirects me to a web page. I have a desktop application. I have a button, once the button is clicked, I need to formulate the url and keyvalue pairs and invoke the webpage.
Im using below code to pass parameters with URL, to open it on the web browser, but I am unabe to render page on the browser.
string URI = "http://localhost:3457/HiddenPageToByPassLogin.aspx";
string myParameters = "param1=value1¶m2=value2¶m3=value3";
using (WebClient wc = new WebClient())
{
wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form- urlencoded";
string HtmlResult = wc.UploadString(URI,myParameters);
}
Can anyone explain me why I am unable to do so? Any help is appreciated