Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / BaseValidatorDesigner.cs / 1 / BaseValidatorDesigner.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.WebControls { using System.ComponentModel; using System.Web.UI.WebControls; ////// /// [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)] [SupportsPreviewControl(true)] public class BaseValidatorDesigner : PreviewControlDesigner { ////// Provides /// a designer for controls derived from ValidatorBase. /// ////// /// public override string GetDesignTimeHtml() { BaseValidator bv = (BaseValidator)ViewControl; // Set to false to force a render bv.IsValid = false; // Put in dummy text if required string originalText = bv.ErrorMessage; ValidatorDisplay validatorDisplay = bv.Display; bool blank = (validatorDisplay == ValidatorDisplay.None || (originalText.Trim().Length == 0 && bv.Text.Trim().Length == 0)); if (blank) { bv.ErrorMessage = "[" + bv.ID + "]"; bv.Display = ValidatorDisplay.Static; } string html = base.GetDesignTimeHtml(); // Reset the control state if (blank) { bv.ErrorMessage = originalText; bv.Display = validatorDisplay; } return html; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved./// Gets the design time HTML of ValidatorBase controls. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CompiledQueryCacheEntry.cs
- DeviceFilterDictionary.cs
- TypeDescriptionProvider.cs
- ContextQuery.cs
- ServicesExceptionNotHandledEventArgs.cs
- HeaderedItemsControl.cs
- _NestedMultipleAsyncResult.cs
- SafeCoTaskMem.cs
- Accessible.cs
- Compiler.cs
- ToolZone.cs
- SamlAssertionKeyIdentifierClause.cs
- BooleanAnimationBase.cs
- DocumentPageViewAutomationPeer.cs
- XmlSignatureManifest.cs
- TextElementEditingBehaviorAttribute.cs
- SerTrace.cs
- SelectionRange.cs
- WindowsContainer.cs
- CalendarTable.cs
- Style.cs
- AppDomainInfo.cs
- DataGridViewLayoutData.cs
- ResizeBehavior.cs
- SmtpAuthenticationManager.cs
- TableLayoutSettingsTypeConverter.cs
- MessageBox.cs
- DataGridViewCellStateChangedEventArgs.cs
- ToolStrip.cs
- FileNotFoundException.cs
- SerializeAbsoluteContext.cs
- WmlTextBoxAdapter.cs
- XmlAttributeCollection.cs
- SecurityTokenTypes.cs
- DateTimeParse.cs
- _UncName.cs
- EpmSourcePathSegment.cs
- CompositeDataBoundControl.cs
- DbConnectionStringBuilder.cs
- MailSettingsSection.cs
- Maps.cs
- PartialList.cs
- X509ChainElement.cs
- ISAPIApplicationHost.cs
- ToolboxDataAttribute.cs
- ProxyGenerationError.cs
- CellIdBoolean.cs
- BufferedWebEventProvider.cs
- SqlServices.cs
- SelectionHighlightInfo.cs
- RTLAwareMessageBox.cs
- SchemaTypeEmitter.cs
- HttpApplicationFactory.cs
- ToolStripItemRenderEventArgs.cs
- ConfigurationLocationCollection.cs
- BitHelper.cs
- WindowsMenu.cs
- BrowserTree.cs
- DatePicker.cs
- BindableTemplateBuilder.cs
- SoapHeaders.cs
- clipboard.cs
- EmptyQuery.cs
- CodeMethodReturnStatement.cs
- QuaternionRotation3D.cs
- WorkflowDebuggerSteppingAttribute.cs
- DataListAutoFormat.cs
- ContractBase.cs
- CodeValidator.cs
- SQLDecimalStorage.cs
- Win32.cs
- XAMLParseException.cs
- VirtualPath.cs
- TextLineBreak.cs
- InitializingNewItemEventArgs.cs
- VerticalAlignConverter.cs
- DbMetaDataFactory.cs
- QilReference.cs
- PrintDialogException.cs
- HttpValueCollection.cs
- ScrollBarRenderer.cs
- TypeDependencyAttribute.cs
- SpellerError.cs
- KeyValuePairs.cs
- KeyBinding.cs
- ThicknessConverter.cs
- PasswordTextContainer.cs
- SplitContainer.cs
- MachineKeySection.cs
- Single.cs
- SchemaImporterExtensionsSection.cs
- EventLogPermission.cs
- NativeRightsManagementAPIsStructures.cs
- App.cs
- KeySplineConverter.cs
- SoapElementAttribute.cs
- TargetConverter.cs
- ScrollProperties.cs
- WindowsButton.cs
- PasswordDeriveBytes.cs