C#asp.net:渲染时如何自WebControl删除span标记 [英] C# asp.net: How to remove span tag from WebControl when rendered
问题描述
在使用asp.net复选框(在出的情况下,从CheckBox继承)它呈现围绕复选框输入控制跨度,跨度这种控制是影响jQuery的脚本。
When using an asp.net CheckBox (and in out case, inherited from a CheckBox) it renders a span around the checkbox input control, this span control is affecting jQuery scripts.
是否有可能呈现时删除此跨度?
Is it possible to remove this span when rendering?
推荐答案
我只是想这是一个测试页面上,我没有得到我的周围CheckBox控件......你确定它是的渲染这个复选框?它是有条件的?
I just tried this on a test page and I'm not getting the around my CheckBox controls... are you sure it's the CheckBox that's rendering this? Is it conditional?
更新:好吧,这似乎是有条件与否的复选框有额外的属性,包括设置的CssClass ......或已禁用属性。
UPDATE: OK, it appears to be conditional on whether or not the CheckBox has extra attributes, including a CssClass setting... or a "disabled" attribute.
这篇关于C#asp.net:渲染时如何自WebControl删除span标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!