开发者

how to write tag Name and ID for ASP.NET Server Controls

I am developing an asp.net server control and in the

protected override void Rende开发者_JAVA技巧rContents(HtmlTextWriter output)

method I just write something equivalent to this:

output.Write("<input id='"+ClientID+"' value="+value ... etc.);

so for the ID it's just ClientID i guess but for the name I'm not really sure, I see that asp.net controls have a bit of difference between them (_ for id is $ for name),

Is there some API from asp.net for getting the Name or we just have to figure it out?


Check this property (Control.UniqueID):

  • http://msdn.microsoft.com/en-us/library/system.web.ui.control.uniqueid.aspx
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜