>Hi everybody,
>
>Here is what I have in ASPX file:
>
><asp:Button ID="btnCancelProfile" runat="server" Text="Cancel" CausesValidation="False"
> EnableViewState="False" OnClientClick="HideElement('< %# tblProInfo.ClientID % >');"
> UseSubmitBehavior="False" />
>
>
>Something is wrong here, because in the script I get What as
< %...
instead of the actual id.
>
>What should I change to make it work?
>
>Thanks a lot in advance.
The < %# syntax in ASP.NET pages is for data binding. Use < %= instead. Get rid of the extra spacing.
I posted something about this on my blog:
http://www.rcs-solutions.com/blog/2007/10/19/AccessingASPNETGeneratedControlsFromJavascript.aspx