Contents
What is ASPX code behind?
Code Behind refers to the code for an ASP.NET Web page that is written in a separate class file that can have the extension of . aspx. cs or . aspx. One major point of Code-Behind is that the code for all the Web pages is compiled into a DLL file that allows the web pages to be hosted free from any Inline Server Code.
What is a ASPX VB file?
aspx is the general file extension for ASP.NET web page. aspx. vb is the code behind file for the ASP.NET web page. suppose, u have a button in . aspx page, you can write handler for this button in the aspx.
How do I view code behind in Visual Studio?
3 Answers
- Right click in the mark-up file itself and choose View Code.
- Right click on the mark-up file in Solution Explorer and choose View Code.
- Click on the Show All Files button at the top of the Solution Explorer, then you can click on the + . Then double click on code-behind file.
- Pressing F7 (see my comment below)
Are there code behind files in aspx.cs?
I’m used to standard asp .net c# web application development were all of the aspx pages come with the code-behind files ‘as standard.’ Thanks. In SharePoint, you can have a code-behind class, but it needs to be in an assembly, not in an aspx.cs code-behind file.
How to create code behind class in SharePoint?
In SharePoint, you can have a code-behind class, but it needs to be in an assembly, not in an aspx.cs code-behind file. You can then create a MyNamspace.MyPage class and do everything you would do in a regular code-behind file.
Code-Behind is hidden by design from both 2007 and 2010 versions. See here to enable it on a per location basis (PageParserPath). You’ll be better off in the long run in terms of supportability, maintenance and management to stick to convention in SharePoint and use controls rather than code-behind if you can.
But answering you question, there is no code behind available for you in SharePoint pages, at least in MOSS 2007. Not sure about SharePoint 2010 exactly, but must be the same. Thanks for contributing an answer to Stack Overflow!