Posted: 11/25/2011
HI,
I'm a newbie so if the question is selly then sorry !
When I create a button using Visual Studio's Design view and then double click it , an event handler with an empty body is created. as example is shown below
protected void Button1_Click (object sender, EventArgs e)
{
}
BUT sometimes it gets created in the aspx file (i don't know why its sometimes different) and even
though I delete the method in the aspx file it not execute the method in the cs file. BUT I want to use the method in the cs file and force it
to use only that.
Any help would be appreciated.Thanks!
Posted: 11/27/2011
You need to check the CodeBehind attribute of your ASPX Page directive. It should be like CodeBehind="YourPage.aspx.cs"
Posted: 12/2/2011
Hi
First thanks for your reply. I checked my file and it is as you mentioned CodeBehind="YourPage.aspx.cs" but it still doesn't work (: