I have a web forms page with a button that involkes a __doPostBack callback to the page. I would like to invoke this manually - by "manually" I mean from outside the webpage, for example by using wget. Is there a way or an example of the best way to do this, 开发者_JS百科please?
No, it's not impossible to do this, although I'm not sure if it can be done with wget, becuse you have to set page variables using javascript, which wget won't support. You would most likely want to use something like perl or some other scripting language to post a postback with the correct variables set.
This is a non-trivial task, but it should be straight forward. open your web page, and look at the source. Then find the __doPostBack code and you should see how it works. Use something like Fiddler to view your postback variables. Then duplicate this on your "outside" code.
Rather looks like you can't do this, closing the Q
you can use something like WatIn http://watin.sourceforge.net/. Its not direcly intended for stuff like this, but can be used to programmatic click on buttons on a webpage.
精彩评论