Compiler Error Message: BC30456: 'NewTemplate_Click' is not a member of 'ASP

Last post 07-12-2010, 8:48 PM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  07-08-2010, 1:32 AM 62344

    Compiler Error Message: BC30456: 'NewTemplate_Click' is not a member of 'ASP

    <asp:ImageButton id="NewTemplate" BorderWidth="1" Runat="server" AlternateText="[[NewTemplate]]" ImageUrl="../Load.ashx?type=image&file=newtemplate.gif" OnClick="NewTemplate_Click" />
     
    i used the above control in my page and added

    <script language="javascript" type="text/javascript">

    function NewTemplate_Click()

    {

    if(isDemoMode)

    {

    alert(OxO5773[6])

    ;return false;

    }

    </script>
     
    in the head part of the page
    i get the above error
  •  07-08-2010, 4:33 AM 62354 in reply to 62344

    Re: Compiler Error Message: BC30456: 'NewTemplate_Click' is not a member of 'ASP

    Hi svk,
     
    In you code you set OnClick="NewTemplate_Click", so you need to make sure you have a method name "NewTemplate_Click" on server side(Codebehind).
     
    If you just want the button to execution a javascript method. please change it to OnClientClick="NewTemplate_Click()"
     
    Regards,
     
    ken
  •  07-08-2010, 6:10 AM 62358 in reply to 62354

    Re: Compiler Error Message: BC30456: 'NewTemplate_Click' is not a member of 'ASP

    but is the above script correct for opening the new template
     
    i have this now

    <asp:Button ID="cmdnewtemp" runat="server" Text="New Template" OnClientClick="NewTemplate_Click();return false"

    TabIndex="12" Width="155px" />

    with the above script but nothing happens bothing gets opened
  •  07-12-2010, 8:48 PM 62443 in reply to 62358

    Re: Compiler Error Message: BC30456: 'NewTemplate_Click' is not a member of 'ASP

    Hi svk,
     
    I am not very sure what you mean "opening the new template".
     
    Where the button  you put in ?
     
    Can you explain your requirement on detail?
     
    Regards,
     
    ken
View as RSS news feed in XML