• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5939
  • Last Modified:

'ASP.Default_aspx' does not contain a definition for 'btnSelect_OnClick'

Hi experts,

I got this error,

'ASP.Default_aspx' does not contain a definition for 'btnSelect_OnClick'

<input type="button" id="btnSelect" OnServerClick="btnSelect_OnClick" value="Select my Stores"
Line 53:                         runat="server" NAME="btnSelect">


but the definition for the btnSelect_Onclick is already defined

here
            protected System.Web.UI.HtmlControls.HtmlInputButton btnSelect;
and
here
      this.btnSelect.ServerClick += new System.EventHandler(this.btnSelect_ServerClick);

what else can i do.

thanks
0
SirReadAlot
Asked:
SirReadAlot
  • 3
  • 2
1 Solution
 
Hamed ZaghaghiProgrammerCommented:
change
this.btnSelect.ServerClick += new System.EventHandler(this.btnSelect_ServerClick);
to
this.btnSelect.ServerClick += new System.EventHandler(this.btnSelect_OnClick);

and then

implement btnSelect_OnClick
0
 
SirReadAlotAuthor Commented:
will try this
0
 
SirReadAlotAuthor Commented:
tried this

 this.btnSelect.ServerClick += new System.EventHandler(this.btnSelect_OnClick);
and

still same error
0
 
Hamed ZaghaghiProgrammerCommented:
Implement It
0
 
Hamed ZaghaghiProgrammerCommented:
you must have a method that named btnSelect_OnClick
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now