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
- Pen.cs
- EntryIndex.cs
- GeneralTransform.cs
- Literal.cs
- RegexFCD.cs
- Environment.cs
- DecoderReplacementFallback.cs
- MetadataSource.cs
- CommandPlan.cs
- _CommandStream.cs
- SafeEventLogReadHandle.cs
- ListBase.cs
- GroupDescription.cs
- DateTimePickerDesigner.cs
- OperationInfoBase.cs
- DesignerVerb.cs
- BidOverLoads.cs
- OdbcConnectionHandle.cs
- RepeaterCommandEventArgs.cs
- JavaScriptSerializer.cs
- NameObjectCollectionBase.cs
- WorkflowInstanceSuspendedRecord.cs
- NullReferenceException.cs
- WS2007FederationHttpBindingElement.cs
- FtpWebRequest.cs
- TreeViewDataItemAutomationPeer.cs
- Currency.cs
- Debug.cs
- ScriptResourceMapping.cs
- PageContentCollection.cs
- SimpleBitVector32.cs
- ProxyGenerator.cs
- ObjectDataSourceDesigner.cs
- BindingListCollectionView.cs
- DiagnosticStrings.cs
- DesignerRegionMouseEventArgs.cs
- ImageMap.cs
- ButtonBaseAdapter.cs
- ScrollViewerAutomationPeer.cs
- TemplateControl.cs
- DesignerAutoFormatStyle.cs
- TextEditorDragDrop.cs
- MultiAsyncResult.cs
- ValidationErrorEventArgs.cs
- HtmlTableRow.cs
- lengthconverter.cs
- IndicCharClassifier.cs
- UnsafeNativeMethods.cs
- LicenseProviderAttribute.cs
- RequestCachePolicyConverter.cs
- PropertyManager.cs
- DiscoveryEndpointValidator.cs
- MessageQueueEnumerator.cs
- ConfigXmlDocument.cs
- CounterCreationDataCollection.cs
- DatePickerTextBox.cs
- ToolBarButtonClickEvent.cs
- HttpContextServiceHost.cs
- StrongNameHelpers.cs
- Stroke.cs
- PowerModeChangedEventArgs.cs
- SafeFileHandle.cs
- WebPartConnectionsCancelEventArgs.cs
- AssemblyAttributesGoHere.cs
- PositiveTimeSpanValidator.cs
- ThaiBuddhistCalendar.cs
- Crc32Helper.cs
- UriSection.cs
- DataBinding.cs
- HttpWebRequestElement.cs
- StoreContentChangedEventArgs.cs
- wmiprovider.cs
- COM2Properties.cs
- Content.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- FirstMatchCodeGroup.cs
- TypeAccessException.cs
- CornerRadiusConverter.cs
- TypedReference.cs
- SortDescription.cs
- RawStylusActions.cs
- MergePropertyDescriptor.cs
- Setter.cs
- RotateTransform3D.cs
- DataBindEngine.cs
- BamlBinaryReader.cs
- DeferredElementTreeState.cs
- DescendentsWalkerBase.cs
- WebScriptMetadataMessage.cs
- autovalidator.cs
- XappLauncher.cs
- MyContact.cs
- SqlWriter.cs
- MarkupWriter.cs
- ValueUnavailableException.cs
- XmlAutoDetectWriter.cs
- BamlRecordWriter.cs
- KeyInfo.cs
- _SslSessionsCache.cs
- ObjectSecurity.cs