I am using a Image Button

<asp:ImageButton ID ="SubmitACH" runat="server" ImageUrl="~/images/buttons/selectACHTransfer.gif"
                    AlternateText="Select ACH Transfer" CssClass="goalCloseButtons" OnClick="SubmitACH_Click" />

 

on its On click event I'm writing this code

protected void SubmitACH_Click(object sender, EventArgs e)
        {
            Response.Redirect("abc.aspx");
        }

And I am getting an error

'Page.aspx' does not contain a definition for 'SubmitACH_Click'

Any help

Thanks alot!

Have you defined (in your ASPX code) the "onclick event" as 'SubmitACH_Click'? I see that you have defined it. Have you solved this ?

No I coudnot find out the reason for my problem!
Have used a hyperlink control now in place of an imagebutton. This works fine

<asp:HyperLink ID ="AchSubmit" runat ="server" ImageUrl="~/images/buttons/selectACHTransfer.gif" 
			    Text = "Select ACH Transfer" CssClass="goalCloseButtons"></asp:HyperLink>	

AchSubmit.NavigateUrl = "abc.aspx";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.