c# - How to Fire Asp.net Button Click of Remote Website -


please 1 me fire button click event of remote site , after html code of page

i know can use httpwebrequest data, don't know how fire click event

i find code:

 `httpwebrequest httprequest = (httpwebrequest)webrequest.create("url");       httprequest.method = "post";      httprequest.contenttype = "application/x-www-form-urlencoded";    byte[] bytedata =  encoding.utf8.getbytes(poststring);     httprequest.contentlength = bytedata.length;      stream requeststream = httprequest.getrequeststream();     requeststream.write(bytedata, 0, bytedata.length);     requeststream.close();      httpwebresponse httpwebresponse =      (httpwebresponse)httprequest.getresponse();     stream responsestream =  httpwebresponse.getresponsestream();   stringbuilder sb = new stringbuilder();      using (streamreader reader =      new streamreader(responsestream, system.text.encoding.utf8))     {       string line;       while ((line = reader.readline()) != null)       {         sb.append(line);       }     } 

`

for click use jquery trigger http://api.jquery.com/trigger/

use on page load (registerstartupscript).

if want not on website created want click on button of website, suggest greasemonkey(firefox) or tampermonkey(chrome). can use if want create manipulate website without ide.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -