Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebParts / ZoneButton.cs / 3 / ZoneButton.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.ComponentModel; using System.Web.UI.WebControls; [SupportsEventValidation] internal sealed class ZoneButton : Button { private WebZone _owner; private string _eventArgument; public ZoneButton(WebZone owner, string eventArgument) { if (owner == null) { throw new ArgumentNullException("owner"); } _owner = owner; _eventArgument = eventArgument; } [ DefaultValue(false), ] public override bool UseSubmitBehavior { get { return false; } set { // This is an internal sealed class so we know the setter is never called. throw new InvalidOperationException(); } } protected override PostBackOptions GetPostBackOptions() { // _owner.Page may be null in the designer if (!String.IsNullOrEmpty(_eventArgument) && _owner.Page != null) { PostBackOptions options = new PostBackOptions(_owner, _eventArgument); options.ClientSubmit = true; return options; } return base.GetPostBackOptions(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.ComponentModel; using System.Web.UI.WebControls; [SupportsEventValidation] internal sealed class ZoneButton : Button { private WebZone _owner; private string _eventArgument; public ZoneButton(WebZone owner, string eventArgument) { if (owner == null) { throw new ArgumentNullException("owner"); } _owner = owner; _eventArgument = eventArgument; } [ DefaultValue(false), ] public override bool UseSubmitBehavior { get { return false; } set { // This is an internal sealed class so we know the setter is never called. throw new InvalidOperationException(); } } protected override PostBackOptions GetPostBackOptions() { // _owner.Page may be null in the designer if (!String.IsNullOrEmpty(_eventArgument) && _owner.Page != null) { PostBackOptions options = new PostBackOptions(_owner, _eventArgument); options.ClientSubmit = true; return options; } return base.GetPostBackOptions(); } } } // 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
- CodeGotoStatement.cs
- TransformCollection.cs
- GlobalizationAssembly.cs
- DataGridViewCellCollection.cs
- AdornerHitTestResult.cs
- MultiSelectRootGridEntry.cs
- ServicePoint.cs
- FileVersionInfo.cs
- Underline.cs
- TypeGeneratedEventArgs.cs
- RemotingClientProxy.cs
- DecimalConverter.cs
- ModelVisual3D.cs
- ThreadAttributes.cs
- XPathConvert.cs
- MasterPageBuildProvider.cs
- NotConverter.cs
- DataGridItemEventArgs.cs
- Graph.cs
- InputReportEventArgs.cs
- ResourceType.cs
- DataGridToolTip.cs
- SiteMapHierarchicalDataSourceView.cs
- UxThemeWrapper.cs
- DropShadowBitmapEffect.cs
- EventMappingSettings.cs
- PropertyDescriptorComparer.cs
- Normalizer.cs
- DbExpressionVisitor_TResultType.cs
- ComplexPropertyEntry.cs
- ToolStripDropDownClosedEventArgs.cs
- ConfigXmlAttribute.cs
- TabletDevice.cs
- TemplateField.cs
- ValueTypeFixupInfo.cs
- StringComparer.cs
- EntityTransaction.cs
- DisposableCollectionWrapper.cs
- MetadataUtilsSmi.cs
- ScrollChrome.cs
- Module.cs
- DocumentPageView.cs
- ConnectionConsumerAttribute.cs
- RefreshResponseInfo.cs
- StrokeRenderer.cs
- MetadataCache.cs
- FilteredDataSetHelper.cs
- SoapIgnoreAttribute.cs
- SafeFileHandle.cs
- HiddenField.cs
- Emitter.cs
- Transform3D.cs
- RegistryConfigurationProvider.cs
- ColumnWidthChangedEvent.cs
- prompt.cs
- View.cs
- DataPager.cs
- DocumentApplicationJournalEntryEventArgs.cs
- SecurityDocument.cs
- ThemeInfoAttribute.cs
- SiteMapPath.cs
- HierarchicalDataSourceControl.cs
- SamlAssertionDirectKeyIdentifierClause.cs
- ValueUtilsSmi.cs
- ParameterCollectionEditorForm.cs
- BindingGraph.cs
- StateDesigner.CommentLayoutGlyph.cs
- HttpCapabilitiesSectionHandler.cs
- FixedSOMFixedBlock.cs
- RelationshipDetailsRow.cs
- WorkflowMarkupSerializationManager.cs
- OracleDataAdapter.cs
- CodeDomConfigurationHandler.cs
- ZipPackage.cs
- WebControl.cs
- ComNativeDescriptor.cs
- _AutoWebProxyScriptHelper.cs
- EventMappingSettings.cs
- SessionParameter.cs
- XmlDataSource.cs
- Timer.cs
- EnumerableRowCollection.cs
- FontResourceCache.cs
- ContextMarshalException.cs
- DataError.cs
- NativeMethods.cs
- RuleSettingsCollection.cs
- SafeHGlobalHandleCritical.cs
- TransactionOptions.cs
- EventProvider.cs
- HtmlButton.cs
- SecurityTokenSerializer.cs
- ValidateNames.cs
- AttributeEmitter.cs
- BooleanSwitch.cs
- SqlPersonalizationProvider.cs
- PropertyDescriptorComparer.cs
- UnitySerializationHolder.cs
- PrePrepareMethodAttribute.cs
- HttpChannelHelper.cs