控制asp.net中的html标签 [英] control over html tags in asp.net
本文介绍了控制asp.net中的html标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道为什么asp.net网络表单无法完全控制html标签。请举例说明。
提前谢谢
I want to know that why asp.net web forms have no complete control over html tags. explain with one example please.
Thanks in advance
推荐答案
在ASP.NET中,您可以提供HTML元素一个ID(即ID =htmlButton,并设置为runat =server。然后你可以在C#或VB.NET背后的代码中访问它。
参见论坛讨论关于它。
In ASP.NET you can give HTML elements an ID (ie. ID="htmlButton" and also set that it to runat="server". Then you have access to it in the code behind C# or VB.NET.
See Forum Discussion about it.
ASP.Net网络表单确实可以控制html标签。
ASP.Net web forms does have control over the html tags.
它非常简单
HTML部分:
it's very simple
HTML part:
<img src="img.jpg" id="imgPersonal" runat="server"></img>
< br $>
C#part:
C# part:
imgPersonal.Visible=true;
你可以通过这种方法控制html标签。
Behnam Mohammadi
you can control html tags via this method.
Behnam Mohammadi
这篇关于控制asp.net中的html标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文