client-id

Forcing client ids in ASP.NET

I know that in the next version of ASP.NET we'll finally be able to set the clientids on System.Web controls without the framework doing it for us in a quasi-intelligent way e.g: id="ctl00__loginStatus__profileButton" Does anyone know a good method in the meantime to force the above id to something like id="profileButton" The main ...

How can I get a bound control's client ID with javascript and/or server-side tags?

<asp:DataGrid> <ItemTemplate> 1) <asp:TextBox ID="tbComments" onChange="javascript:checkLength(<%# tbComments.ClientId %>);" runat="server"/> 2) <span id="<%# tbComments.ClientId %>Label"></span> </ItemTemplate> </asp:DataGrid> Any ideas to make the above working (which doesn't :P)? ...