tags - ASP.NET how to modify control id 'ContentPlaceHolder1'? -


when create gridview in asp.net, set control id "factorytable", in browser html code, id turn "contentplaceholder1_factorytable"
can delete "contentplaceholder1_" or modify other name?

just add attribute

clientidmode="static"

to gridview markup.


example:

<asp:textbox id="txtecho2" runat="server" width="65%" clientidmode="static" />

example output:

<input id="txtecho2" style="width: 65%" name="ctl00$masterpagebody$ctl00$txtecho2" />

see here different modes:

http://weblogs.asp.net/asptest/archive/2009/01/06/asp-net-4-0-clientid-overview.aspx


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -