开发者

Get a particular input element from a particular form

Like the statement,

string value = document.forms["sap.client.SsrClient.form"].elements["sapwdssr..requestCounter"].value;

in javascript, is there a corresponding statement to get the value of a particular input element within a parti开发者_开发问答cular form in C#?

I can do so by using HTMLDocument and mshtml interface. But that is a rather cumbersome process so if any direct method or property exists it would be great.


I assume you are asking to parse HTML, rather than attempting to do some form of runtime manipulation of a rendered web page, correct?

If that's the case, I highly suggest you look into the HTML Agility Pack, which we have used very successfully to parse HTML as if it were XML. You could do your stuff with a simple XPath query.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜