获取Html表值 [英] get the Html Table value
本文介绍了获取Html表值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在html表中获取特定
的值,其中为id指定了。 我需要在C#中使用HTML开发它。 |
Hi,
How can i get value of a particular
in html table where id is given for it. where i need to develop this in C# using HTML only. |
推荐答案
查看这篇文章。
如何使用带有C#语言的HTMLTable和HTMLTableRow [ ^ ]
你可以对HTML表控件有一些基本的了解
希望它有所帮助。
Hi,
check this article.
How to Use HTMLTable and HTMLTableRow with C# Language[^]
you may get some basic idea about the HTML table control
hope it helps.
你的问题不是那么清楚。如果你想获得像输入字段一样的表值,那么它是不可能的(即在回发期间在asp.net中)。只有当您解析整个html源页面(称为屏幕抓取)时,才能获得表格的价值。
看看这里可能对你有帮助。
使用C#进行ASP.NET屏幕抓取
your question is not so much clear. if you want to get table value like input fields then it is not possible (i.e during post back in asp.net ) . you can get value of the tables only if you parse the whole html source page which is termed as screen scraping.
take a look here may be help full for you.
Screen Scraping with C# for ASP.NET
.aspx
.aspx
<table>
<tr>
<td id="MyTD" runat="server">
Mahesh Patel</td>
</tr>
</table>
.aspx.cs
.aspx.cs
on page load event....
Response.Write(MyTD.InnerHtml.ToString());
输出....
Mahesh Patel
Output....
"Mahesh Patel"
这篇关于获取Html表值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文