just moment ago I discovered strange behaviour of my visual studio environment. I’m using ASP.net web application. When the webform is added, and i’m trying to place button on webform, instead of declaring button_Click event in code-behind file (WebForm.aspx.cs) this declaration is placed in aspx.file as follows:
<script runat="server">
protected void Button2_Click(object sender, EventArgs e)
{
}
Earlier everything worked correctly. What am i missing?
Thanks everyone for help. unfortunately I don’t know the actual reason, but my problem was solved by deleting my web application from solution and then adding this application again.