简体   繁体   English

如何在aspx的VB代码中获取html控件?

[英]how to get html control in VB code behind for aspx?

WIth aspx, there are UI part(.aspx) and code behind(.aspx.vb). 除了aspx,还有UI部件(.aspx)和背后的代码(.aspx.vb)。
In Markup, there is some html element, like Table with ID='Tab1' 在标记中,有一些html元素,例如ID ='Tab1'的Table

How to got the html element Table in code behind to change its attributes? 如何在代码后面获取html元素Table来更改其属性?

通过分配表ID并将其设置为runat =“ server”,从而使表可在后面的代码中访问

<table id="tbl" runat="server" >....

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM