Asp. NET Web page includes some additional elements that it can recognize and process at run time by ASP.net. Asp. NET pages can also contain reusable, custom controls. These custom controls will be processed by the server. This allows you to set asp.net Web page properties using server code.
IIS 7.0 allows you to configure the following ASP.net page and user control settings:
-Behavior setting: For example, when the current page request finishes, the page retains the view state of itself and all of the server controls it contains.
-General settings: For example, namespaces that are included in all pages.
-Compile settings: for example, compile or interpret a page.
-Services: For example, whether session state is enabled.
(i) Edit settings for pages and controls
IIS 7.0 is ASP. NET pages and controls provide the default settings, but we can change these settings as needed. For example, you can set up a site's master page file or enable view state.
1. Open IIS Manager, and then navigate to the level you want to manage.
2. In the feature view, double-click Pages and controls.
3. On the Pages and Controls page, edit the settings as needed.
4. When you are finished, click Apply in the Actions pane.
In addition, you can use the command line to hit the above purpose.
Command line
Enable or disable page output buffering
To enable or disable page output buffering, use the following syntax:
Appcmd Set config/commit:webroot/section:pages/buffer:true| False
Variable buffer:true is used to enable page output buffering. The default value is True.
Specify master Page files
To specify a master page file, use the following syntax:
Appcmd Set config/commit:webroot/section:pages/masterpagefile:string
The variable string is the name of the master page file.
Specify a style sheet theme
To specify a style sheet to apply to a page, use the following syntax:
Appcmd Set config/commit:webroot/section:pages/stylesheettheme:string
The variable string is the name of the style sheet.
Specify page Topics
To specify the subject name of a page that is used in the scope of the profile, use the following syntax:
Appcmd Set config/commit:webroot/section:pages/theme:string
The variable string is the name of the topic.
Enable or disable authenticated view state
To enable or disable the ability to perform a message validation check (MAC) on the page's view state when the page is postback from the client, use the following syntax:
Appcmd Set config/commit:webroot/section:pages/enableviewstatemac:true| False
Variable enableviewstatemac:true is used to enable Authenticated view state. The default value is True.