hi all.one of my visual studio web pages has encountrated with an error! when i add a control like button and double click on it too write its code,instead of open in code behind it opens in markup as following:
You will have to create the page again and specify you want a separate file for server-side code. Open VS and create a new web form and in the "Add New Item" dialog, write the aspx file name AND ensure you check the "Place code in separate file" option located
at the bottom right. HTH,
Barcode, Labeling, Printing & Imaging tools for ASP.NET Developers
Marked as answer by Angie xu - MSFT on Dec 09, 2012 10:58 PM
behzad306
Member
19 Points
34 Posts
problem with place of controls event handler!!!
Dec 01, 2012 06:33 AM|LINK
hi all.one of my visual studio web pages has encountrated with an error! when i add a control like button and double click on it too write its code,instead of open in code behind it opens in markup as following:
<script runat="server">
protected void Button3_Click(object sender, EventArgs e)
{
}
</script>
how can i fix it to open in code behind?
Neodynamic
Participant
1002 Points
286 Posts
Re: problem with place of controls event handler!!!
Dec 01, 2012 09:01 AM|LINK
You will have to create the page again and specify you want a separate file for server-side code. Open VS and create a new web form and in the "Add New Item" dialog, write the aspx file name AND ensure you check the "Place code in separate file" option located at the bottom right. HTH,