What is the use of the CodeFile attribute in an ASP.NET page ?
What is the use of the CodeFile attribute in an ASP.NET page ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
CodeFile attribute is used for deploying a single page without deploying the whole application :-
Here are the instructions to deploy a single page to a web application. The following example is using the page /Forms/CreateUser.aspx
In the .cs file change the name of the class to one that doesn’t exist. For example, change the following:
To:
In the aspx, ascx, master, etc. change the Codebehind to CodeFile and change the name of the class specified in the Inherits attribute to the same name as in the .cs file. For example change the following:
To: