Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xml/System.Web.Caching/SqlCacheDependency.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@

The database name passed to the `database` parameter must be defined in the application's Web.config file. For example, the following Web.config file defines a database named pubs for <xref:System.Web.Caching.SqlCacheDependency> change notifications.

```
```xml
<configuration>
<connectionStrings>
<add name="Pubs" connectionString="Data Source=(local); Initial Catalog=pubs; Integrated Security=true"; providerName="System.Data.SqlClient" />
Expand Down Expand Up @@ -247,7 +247,7 @@
## Remarks
The following markup shows a typical output-cache dependency directive.

```
```xml
<%@ OutputCache Duration="3600" SqlDependency="Northwind:Employees" VaryByParam="none" %>
```

Expand Down
4 changes: 2 additions & 2 deletions xml/System.Web.Compilation/RouteUrlExpressionBuilder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
## Examples
The following example shows how to create markup that generates a hyperlink with a URL that is formatted for a route. The route is defined by using `http://www.contoso.com/search/{searchterm}` as the URL pattern.

```
```xml
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl="<%$ RouteUrl:searchterm=Bicycles %>">
Search for Bicycles
Expand All @@ -47,7 +47,7 @@

If the URL parameters provided to the `RouteUrl` expression are not sufficient to uniquely identify a route, you must include the route name. For example, if a Web application has two routes with `searchterm` as the sole URL parameter, the routes would have to be defined by using route names, and the hyperlink markup would resemble the following example:

```
```xml
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl="<%$ RouteUrl:searchterm=Bicycles,
routename=BasicSearchRoute %>">
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Compilation/RouteValueExpressionBuilder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
## Examples
The following example shows how to use markup to display the value of the URL parameter `searchterm`. The route is defined by using `http://www.contoso.com/search/{searchterm}` as the URL pattern.

```
```xml
<asp:Label ID="Label1" runat="server"
text="<%$ RouteValue:searchterm %>">
</asp:Label>
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Configuration/AuthorizationSection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
> [!NOTE]
> If you use the `credentials` section, be sure to follow the guidelines explained at [ASP.NET Authentication](https://learn.microsoft.com/previous-versions/aspnet/eeyk640h(v=vs.100)). For scalability and better security capability, it is recommended that you use an external database to store the users' credentials. For more information about building secure ASP.NET applications, see [Securing Your ASP.NET Application](https://learn.microsoft.com/archive/msdn-magazine/2012/january/asp-net-security-securing-your-asp-net-applications) and [Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication](https://learn.microsoft.com/previous-versions/msp-n-p/ff649357(v=pandp.10)).

```
```xml
<authorization>
<allow users="userName" roles="admin" verbs="post" />
<deny users="*" verbs="post"/>
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Configuration/ClientTarget.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

The following code example shows how to declaratively specify values for several properties of the <xref:System.Web.Configuration.ClientTarget> class.

```
```xml
<clientTarget>
<add alias=
"uplevel"
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Configuration/ClientTargetCollection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

The following example shows an excerpt from the configuration file.

```
```xml
<clientTarget>
<add alias=
"uplevel"
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Configuration/ClientTargetSection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

The following code example shows how to declaratively specify values for several properties of the <xref:System.Web.Configuration.ClientTarget> class.

```
```xml
<clientTarget>
<add alias=
"uplevel" userAgent="Mozilla/5.0 (compatible;MSIE 6.0;Windows NT 5.1)"/>
Expand Down
12 changes: 5 additions & 7 deletions xml/System.Web.Configuration/HttpCapabilitiesBase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2349,7 +2349,7 @@
## Remarks
Intended for internal use only. Some browsers require a meta-tag similar to the following for the browser to render properly.

```
```html
<META NAME="NAME" CONTENT="VALUE">
```

Expand Down Expand Up @@ -2421,14 +2421,12 @@
## Remarks
If `true`, server-control adapters insert the following tag into the HTML `<head>` element of a Web page:

```
```html
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT=""; CHARSET="">
```

In this example, `CONTENT` is the value returned by the <xref:System.Web.Configuration.HttpCapabilitiesBase.PreferredRenderingMime%2A> property, and `charset` is the character encoding used.



## Examples
The following code example shows how to determine whether the browser requires an HTML `<meta>` element for which the `content-type` attribute is specified.

Expand Down Expand Up @@ -2724,7 +2722,7 @@
## Remarks
HTTP is a stateless protocol, and `VIEWSTATE` is one mechanism used to persist client changes across multiple requests. Each control on a Web page contains a <xref:System.Web.UI.Control.ViewState%2A> property, which represents the accumulation of any changes made by the client. In a Web Forms page, these changes are encoded in postback data as the `value` of an HTML `<input>` element with a `type` attribute of `hidden`. For example:

```
```html
<input type="hidden" name="__VIEWSTATE" value="t0PH_u56?cDxleHQ7P=" />
```

Expand Down Expand Up @@ -3147,7 +3145,7 @@
## Remarks
The `cache-control` value for the `http-equiv` attribute of HTML `<meta>` elements allows control over client caching of downloaded content, which includes Web pages. The following HTML fragment shows an example:

```
```html
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"/>
```

Expand All @@ -3157,7 +3155,7 @@

The <xref:System.Web.Configuration.HttpCapabilitiesBase.SupportsCacheControlMetaTag%2A> property also applies to the equivalent HTTP header form:

```
```txt
CACHE-CONTROL: NO-CACHE
```

Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Configuration/HttpHandlerAction.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

The following configuration excerpt shows how to specify values declaratively for the `httpHandlers` section.

```
```xml
<httpHandlers>
<add path="Calculator.custom"
type="Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler"
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Configuration/HttpHandlersSection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

The following configuration excerpt shows how to specify values declaratively for the `httpHandlers` section.

```
```xml
<httpHandlers>
<add path="Calculator.custom"
type="Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler"
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Configuration/HttpModulesSection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

The following configuration file example shows how to specify values declaratively for the [httpModules Element (ASP.NET Settings Schema)](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/9b9dh535(v=vs.100)) section.

```
```xml
<httpModules>
<add name="TimerModule"
type="Samples.Aspnet.Configuration.RequestTimeInterval, RequestTimeInterval Version=1.0.1557.23158, Culture=neutral,
Expand Down
3 changes: 1 addition & 2 deletions xml/System.Web.Configuration/PagesEnableSessionState.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@
## Examples
The following configuration file excerpt shows how to declaratively use values of the <xref:System.Web.Configuration.PagesEnableSessionState> enumeration to specify whether the session state is enabled.

```
```xml
<system.web>
<pages enableSessionState="true" />
</system.web>

```

The following code example shows how to use the <xref:System.Web.Configuration.PagesEnableSessionState> enumeration with the <xref:System.Web.Configuration.PagesSection> type.
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Configuration/PagesSection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

The following configuration file example shows how to specify values declaratively for the [pages](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/950xf363(v=vs.100)) section.

```
```xml
<system.web>
<pages buffer="true"
enableSessionState="true"
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Configuration/PassportAuthentication.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
## Examples
The following code example shows how to obtain the <xref:System.Web.Configuration.PassportAuthentication> object from the configuration file of an existing Web application. Also shown is a configuration example.

```
```xml
<authentication>
<passport redirectUrl="Login.aspx"/>
</authentication>
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Configuration/SessionStateSection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

The following configuration file example shows how to specify values declaratively for the `sessionState` section.

```
```xml
<configuration>
<system.web>
<sessionState mode="InProc"
Expand Down
42 changes: 21 additions & 21 deletions xml/System.Web.DynamicData/DynamicControl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,28 +76,28 @@
<a name="declarative_syntax"></a>
## Declarative Syntax

```
```xml
<asp:DynamicControl
    ApplyFormatInEditMode="True|False"
    ConvertEmptyStringToNull="True|False"
    CssClass="string"
    DataField="string"
    DataFormatString="string"
    EnableViewState="True|False"
    HtmlEncode="True|False"
    ID="string"
    Mode="Edit|Insert|ReadOnly"
    NullDisplayText="string"
    OnDataBinding="DataBinding event handler"
    OnDisposed="Disposed event handler"
    OnInit="Init event handler"
    OnLoad="Load event handler"
    OnPreRender="PreRender event handler"
    OnUnload="Unload event handler"
    runat="server"
    UIHint="string"
    ValidationGroup="string"
    Visible="True|False"
ApplyFormatInEditMode="True|False"
ConvertEmptyStringToNull="True|False"
CssClass="string"
DataField="string"
DataFormatString="string"
EnableViewState="True|False"
HtmlEncode="True|False"
ID="string"
Mode="Edit|Insert|ReadOnly"
NullDisplayText="string"
OnDataBinding="DataBinding event handler"
OnDisposed="Disposed event handler"
OnInit="Init event handler"
OnLoad="Load event handler"
OnPreRender="PreRender event handler"
OnUnload="Unload event handler"
runat="server"
UIHint="string"
ValidationGroup="string"
Visible="True|False"
>
</asp:DynamicControl>
```
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.DynamicData/DynamicField.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<a name="declarative_syntax"></a>
## Declarative Syntax

```
```xml
<asp:DynamicField
AccessibleHeaderText="string"
ApplyFormatInEditMode="true|false"
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Management/WebFailureAuditEvent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

The following configuration excerpt shows how to enable ASP.NET to use the <xref:System.Web.Management.WebFailureAuditEvent> event.

```
```xml
<healthMonitoring
enabled="true"
heartBeatInterval="0">
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Profile/ProfileGroupBase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
## Examples
The following Web.config file specifies a user profile that contains a group of properties with a group name of `Address`. The grouped properties generated for the <xref:System.Web.HttpContext.Profile%2A> property of the current <xref:System.Web.HttpContext> will be preceded by the group name, for example, `Profile.Address.Street`.

```
```xml
<configuration>
<connectionStrings>
<add name="SqlServices" connectionString="Data Source=localhost;Integrated Security=SSPI;Initial Catalog=aspnetdb;" />
Expand Down
12 changes: 6 additions & 6 deletions xml/System.Web.Profile/ProfileManager.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

By default, the user profile is disabled for all ASP.NET applications. To enable the user profile, set the `enabled` attribute of the [profile](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ms164644(v%3dvs.100)) configuration element to true, as shown in the following example.

```
```xml
<configuration>
<system.web>
<profile enabled="true" />
Expand All @@ -38,7 +38,7 @@

A profile provider is used to store and retrieve properties in the user profile. The .NET Framework includes a <xref:System.Web.Profile.SqlProfileProvider> class that stores user profile properties in a SQL Server database. A <xref:System.Web.Profile.SqlProfileProvider> instance named `AspNetSqlProvider` is specified in the machine configuration as the default profile provider. The `AspNetSqlProvider` instance connects to the SQL Server database on the local Web server. You can specify a <xref:System.Web.Profile.SqlProfileProvider> that connects to another SQL Server as the default profile provider by using the [providers](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ms164654(v%3dvs.100)) configuration element and the `defaultProvider` attribute of the [profile](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ms164644(v%3dvs.100)) configuration element, as shown in the following example.

```
```xml
<configuration>
<connectionStrings>
<add name="SqlServices" connectionString=
Expand Down Expand Up @@ -142,7 +142,7 @@
## Examples
The following configuration file excerpt shows the [profile](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ms164644(v%3dvs.100)) element in the [system.web](/dotnet/framework/configure-apps/file-schema/web/system-web-element-web-settings) section of the Web.config file for an ASP.NET application. It sets the application's default profile provider to a <xref:System.Web.Profile.SqlProfileProvider> instance and sets the <xref:System.Web.Profile.ProfileManager.ApplicationName%2A> to `MyApplication`.

```
```xml
<profile enabled="true" defaultProvider="SqlProvider">
<providers>
<add name="SqlProvider"
Expand Down Expand Up @@ -191,7 +191,7 @@
## Examples
The following configuration file excerpt shows the [profile](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ms164644(v%3dvs.100)) element in the [system.web](/dotnet/framework/configure-apps/file-schema/web/system-web-element-web-settings) section of the Web.config file for an ASP.NET application. It specifies the application's default profile provider to a <xref:System.Web.Profile.SqlProfileProvider> instance and sets the `automaticSaveEnabled` attribute to `true`.

```
```xml
<profile enabled="true"
automaticSaveEnabled="true"
defaultProvider="SqlProvider">
Expand Down Expand Up @@ -477,7 +477,7 @@
## Examples
The following code example shows the [profile](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ms164644(v%3dvs.100)) element in the [system.web](/dotnet/framework/configure-apps/file-schema/web/system-web-element-web-settings) section of the Web.config file for an ASP.NET application where the user profile has been enabled.

```
```xml
<profile enabled="true" defaultProvider="SqlProvider">
<providers>
<add name="SqlProvider"
Expand Down Expand Up @@ -1161,7 +1161,7 @@
## Remarks
The <xref:System.Web.Profile.ProfileManager.Providers%2A> property references all of the profile providers enabled for an application, including providers added in the machine configuration and providers added in all Web.config files. You can control which profile providers are available for an application using the [providers](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ms164654(v%3dvs.100)) element of the [profile](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ms164644(v%3dvs.100)) section in the configuration file. For example, the following Web.config file removes the profile providers specified in parent configuration files and adds a <xref:System.Web.Profile.SqlProfileProvider> instance as the profile provider for the application.

```
```xml
<configuration>
<connectionStrings>
<add name="SqlServices" connectionString=
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Web.Routing/PageRouteHandler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@

Permissions are defined in the Web.config file, as shown in the following example:

```
```xml
<configuration>
<location path="categoriespage.aspx">
<system.web>
Expand Down
4 changes: 2 additions & 2 deletions xml/System.Web.Routing/UrlRoutingHandler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

To register a customized handler for a particular file name extension, you must add that handler in the Web.config file. The following example shows how to register a customized handler for an ASP.NET Web site that is running in IIS 6.0 or IIS 7.0 in Classic mode.

```
```xml
<system.web>
<httpHandlers>
<add verb="*" path="*.abc"
Expand All @@ -53,7 +53,7 @@

The following example shows how to register the same handler for an ASP.NET Web site that is running in IIS 7.0.

```
```xml
<system.webServer>
<handlers>
<add verb="*" path="*.abc"
Expand Down
Loading