Satyan G

Satyan G

  • 0
  • 2
  • 0

How can get page source code on post method with parameters

May 1 2018 7:07 AM
I would like to get result from http://cbseresults.nic.in/Jee_main_pzy/jee_cbse_2018.htm

need to give two inputs regno & dob, regno=11800184, dob=20/11/2000.

after submit we will get http://cbseresults.nic.in/Jee_main_pzy/jee_cbse_2018.asp

my request is through webclient with parameters i get result page source code.

Please help in this issue.

Thank you
 
i tried below code
 
string url="http://cbseresults.nic.in/Jee_main_pzy/jee_cbse_2018.asp";
 WebClient wc = new WebClient();
wc.QueryString.Add("regno", "11800184");
wc.QueryString.Add("dob", "20/11/2000");
wc.QueryString.Add("B2", "Submit");
var
data = wc.UploadValues(url, "POST", wc.QueryString);
var
responseString = UnicodeEncoding.UTF8.GetString(data);
TextBox1.Text = responseString;
 

Answers (1)