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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -