XhtmlControlAdapter.ConditionalRenderCustomAttribute Method

Definition

Gets the value of the specified custom attribute from the associated control and renders it on the next element if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Overloads

ConditionalRenderCustomAttribute(XhtmlMobileTextWriter, String)

Gets the value of the attribute with the specified name from the associated control and renders it on the next element with the specified name if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

ConditionalRenderCustomAttribute(XhtmlMobileTextWriter, String, String)

Includes a custom attribute with the specified name and value in the next element to be rendered, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

ConditionalRenderCustomAttribute(XhtmlMobileTextWriter, String)

Gets the value of the attribute with the specified name from the associated control and renders it on the next element with the specified name if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

C#
protected virtual void ConditionalRenderCustomAttribute(System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter writer, string attributeName);

Parameters

writer
XhtmlMobileTextWriter

The XhtmlMobileTextWriter object used to render the server control content on the client's browser.

attributeName
String

The name of the attribute.

Remarks

The attribute is rendered if the attribute name is not an empty string ("") and the control has the specified attribute.

This method is primarily used by the .NET Framework internally.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

ConditionalRenderCustomAttribute(XhtmlMobileTextWriter, String, String)

Includes a custom attribute with the specified name and value in the next element to be rendered, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

C#
protected virtual void ConditionalRenderCustomAttribute(System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter writer, string attributeName, string markupAttributeName);

Parameters

writer
XhtmlMobileTextWriter

The XhtmlMobileTextWriter object used to render the server control content on the client's browser.

attributeName
String

The name of the attribute.

markupAttributeName
String

The XHTML markup name of the attribute.

Remarks

The attribute is rendered if both the attributeName and markupAttributeName are not empty strings ("") and the control has the specified attribute. Use this method to provide a markup attribute in the rendered element that is different from the attribute or property name used in your control.

This method is primarily used by the .NET Framework internally.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1