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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -