Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / ButtonDesigner.cs / 1 / ButtonDesigner.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.Design.WebControls {
using System.ComponentModel;
using System.Diagnostics;
using System;
using System.Web.UI.WebControls;
using Microsoft.Win32;
///
///
///
/// The designer for the button WebControl.
///
///
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)]
[SupportsPreviewControl(true)]
public class ButtonDesigner : ControlDesigner {
///
///
///
/// Gets the design time HTML of the button control.
///
///
public override string GetDesignTimeHtml() {
Button b = (Button)ViewControl;
string originalText = b.Text;
Debug.Assert(originalText != null);
bool blank = (originalText.Trim().Length == 0);
if (blank) {
b.Text = "[" + b.ID + "]";
}
string html = base.GetDesignTimeHtml();
if (blank) {
b.Text = originalText;
}
return html;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GenerateScriptTypeAttribute.cs
- CodeTypeOfExpression.cs
- VirtualizingStackPanel.cs
- DataObjectCopyingEventArgs.cs
- HandlerFactoryWrapper.cs
- XmlSchemaObject.cs
- RemotingAttributes.cs
- HttpListenerContext.cs
- SignedXml.cs
- ProfileGroupSettingsCollection.cs
- Win32Exception.cs
- LogReserveAndAppendState.cs
- ConfigurationSectionCollection.cs
- TextEditorContextMenu.cs
- ToolBarButton.cs
- TextWriterTraceListener.cs
- DataObject.cs
- MetabaseServerConfig.cs
- TransportConfigurationTypeElementCollection.cs
- PresentationAppDomainManager.cs
- UInt64.cs
- XmlDataSource.cs
- ValidatingPropertiesEventArgs.cs
- DataListDesigner.cs
- SoundPlayerAction.cs
- FormsAuthentication.cs
- QilName.cs
- AppliedDeviceFiltersDialog.cs
- SliderAutomationPeer.cs
- HttpConfigurationContext.cs
- SmiEventSink_DeferedProcessing.cs
- CodeCatchClauseCollection.cs
- XPathException.cs
- ResizingMessageFilter.cs
- BlockCollection.cs
- UriTemplateDispatchFormatter.cs
- MethodExpr.cs
- RowToFieldTransformer.cs
- ResourceCategoryAttribute.cs
- MsmqChannelFactoryBase.cs
- ConfigurationLocation.cs
- QilInvokeLateBound.cs
- ThreadExceptionDialog.cs
- PassportIdentity.cs
- MissingMemberException.cs
- CodeDirectoryCompiler.cs
- ColumnResizeUndoUnit.cs
- WebConfigurationHostFileChange.cs
- TextViewDesigner.cs
- ConfigurationLocation.cs
- DropDownList.cs
- TreeNodeStyle.cs
- InternalControlCollection.cs
- String.cs
- SharedPerformanceCounter.cs
- TabRenderer.cs
- ChannelEndpointElement.cs
- XmlSchemaAnnotated.cs
- CursorInteropHelper.cs
- DbParameterHelper.cs
- ConfigXmlComment.cs
- Registry.cs
- DateTime.cs
- XmlElementAttributes.cs
- TreeWalkHelper.cs
- BamlLocalizer.cs
- RouteValueDictionary.cs
- Literal.cs
- XmlIgnoreAttribute.cs
- PropertiesTab.cs
- SignedInfo.cs
- CommonProperties.cs
- UnmanagedMemoryStreamWrapper.cs
- PolicyUtility.cs
- InheritanceService.cs
- UniqueIdentifierService.cs
- COAUTHINFO.cs
- SqlCrossApplyToCrossJoin.cs
- QuaternionAnimation.cs
- X509SubjectKeyIdentifierClause.cs
- OdbcErrorCollection.cs
- DataDocumentXPathNavigator.cs
- WebPartZoneCollection.cs
- WhitespaceRuleLookup.cs
- HtmlInputText.cs
- LicenseException.cs
- COMException.cs
- FieldCollectionEditor.cs
- Console.cs
- FlagsAttribute.cs
- EndEvent.cs
- ScrollContentPresenter.cs
- InternalRelationshipCollection.cs
- Error.cs
- MultiPropertyDescriptorGridEntry.cs
- AsyncResult.cs
- AlignmentXValidation.cs
- FormViewModeEventArgs.cs
- AccessText.cs
- ButtonChrome.cs