Code:
/ FX-1434 / FX-1434 / 1.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
- PreviousTrackingServiceAttribute.cs
- MsmqChannelListenerBase.cs
- SoapUnknownHeader.cs
- CodeAccessSecurityEngine.cs
- InstancePersistenceException.cs
- DatagridviewDisplayedBandsData.cs
- StylusPoint.cs
- TCEAdapterGenerator.cs
- SqlMetaData.cs
- ProxyHwnd.cs
- DataSetMappper.cs
- UnlockCardRequest.cs
- CompiledIdentityConstraint.cs
- ProfileEventArgs.cs
- SafeFileMappingHandle.cs
- RtfNavigator.cs
- DataGridColumnCollection.cs
- CompiledQueryCacheKey.cs
- XmlTextReader.cs
- HttpStreamFormatter.cs
- HtmlInputReset.cs
- ImageInfo.cs
- ChangePassword.cs
- GetLastErrorDetailsRequest.cs
- Calendar.cs
- WebPartsPersonalization.cs
- GroupBoxAutomationPeer.cs
- ViewBox.cs
- XmlSchemaChoice.cs
- TransformDescriptor.cs
- SqlProviderServices.cs
- HttpVersion.cs
- MergePropertyDescriptor.cs
- DataObjectMethodAttribute.cs
- ComPlusServiceHost.cs
- CodeMethodMap.cs
- XmlSchemaInferenceException.cs
- SoapFaultCodes.cs
- HttpChannelHelpers.cs
- DbTransaction.cs
- DataPointer.cs
- XmlSortKey.cs
- MetadataPropertyCollection.cs
- FontEmbeddingManager.cs
- DockProviderWrapper.cs
- Mapping.cs
- SerialErrors.cs
- CngKey.cs
- ImageMetadata.cs
- ProfileModule.cs
- TypeUtil.cs
- QilLiteral.cs
- AutomationPatternInfo.cs
- Polygon.cs
- StatusBarPanel.cs
- OpenFileDialog.cs
- UserControlBuildProvider.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- HitTestDrawingContextWalker.cs
- DataReceivedEventArgs.cs
- GPRECTF.cs
- DependencyObjectPropertyDescriptor.cs
- RenderOptions.cs
- smtppermission.cs
- MaskDescriptor.cs
- XmlDataSourceNodeDescriptor.cs
- MetadataArtifactLoaderResource.cs
- relpropertyhelper.cs
- XmlSchemaSimpleTypeList.cs
- EntitySqlException.cs
- QueryAccessibilityHelpEvent.cs
- SqlConnectionManager.cs
- SpellerHighlightLayer.cs
- RolePrincipal.cs
- SafeLibraryHandle.cs
- DataContract.cs
- CookieProtection.cs
- COM2FontConverter.cs
- WebPartZone.cs
- CheckoutException.cs
- AxisAngleRotation3D.cs
- MarshalByValueComponent.cs
- TabletDeviceInfo.cs
- RsaSecurityTokenAuthenticator.cs
- BrowserDefinitionCollection.cs
- TextEditorSpelling.cs
- PageParserFilter.cs
- FragmentQueryKB.cs
- Bits.cs
- RoutingBehavior.cs
- MenuBase.cs
- ConsoleCancelEventArgs.cs
- RegistrationServices.cs
- LabelDesigner.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- DataGridViewComboBoxEditingControl.cs
- VisualStateChangedEventArgs.cs
- _NegoStream.cs
- MissingMemberException.cs
- TrackingStringDictionary.cs