本文整理匯總了C#中System.Web.UI.Design.ConnectionStringEditor類的典型用法代碼示例。如果您正苦於以下問題:C# ConnectionStringEditor類的具體用法?C# ConnectionStringEditor怎麽用?C# ConnectionStringEditor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ConnectionStringEditor類屬於System.Web.UI.Design命名空間,在下文中一共展示了ConnectionStringEditor類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: DefaultValue
// Define a custom class derived from the SqlDataSource Web control.
public class SqlDataSourceWithBackup : SqlDataSource
{
private string _alternateConnectionString;
// Define an alternate connection string, which could be used
// as a fallback value if the primary connection string fails.
// The EditorAttribute indicates the property can
// be edited at design-time with the ConnectionStringEditor class.
[
DefaultValue(""),
EditorAttribute(typeof(System.Web.UI.Design.ConnectionStringEditor),
typeof(System.Drawing.Design.UITypeEditor)),
Category("Data"),
Description("The alternate connection string.")
]
public string AlternateConnectionString
{
get
{
return _alternateConnectionString;
}
set
{
_alternateConnectionString = value;
}
}
}