Thursday, April 19, 2012

jquery function not being called

I'm trying to call a jquery function from a asp link button. Here is my link button html:



        <div style="padding-left:75px">
<asp:LinkButton ID="lbAddCC" runat="server" ClientIDMode="Static" OnClick="ShowCCControls()" Text="Add CC"></asp:LinkButton>
</div>


Here is my jquery function:



        function ShowCCControls() {

$('#lblCC').show();
$('#txtCC').show();
} //end ShowCCControls()


When I try to build, I get the error:



ASP.internal_email_aspx does not contain a definition for 'ShowCCControls' and no extension method 'ShowCCControls' accepting a first argument of type 'ASP.internal_email_aspx' could be found (are you missing a using directive or an assembly reference?)



I have this working on another page using a check box:



                   <asp:CheckBox ID="chkNew" TabIndex="8" runat="server" Text="New Tank" OnClick="SetNewTankControls()"
ClientIDMode="Static" />


Anybody see an issue? Thanks





No comments:

Post a Comment