Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / WebParts / ZoneButton.cs / 1 / 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. // //----------------------------------------------------------------------------- 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataBindingCollectionEditor.cs
- StyleXamlParser.cs
- StyleTypedPropertyAttribute.cs
- RichTextBoxDesigner.cs
- Translator.cs
- CollectionChangeEventArgs.cs
- CellParagraph.cs
- WebRequestModulesSection.cs
- EntityDataSourceViewSchema.cs
- KeyToListMap.cs
- IsolatedStoragePermission.cs
- SmtpCommands.cs
- MSG.cs
- DefaultWorkflowSchedulerService.cs
- EntityCommandExecutionException.cs
- uribuilder.cs
- CustomLineCap.cs
- DataGridBoolColumn.cs
- ApplicationInfo.cs
- FileEnumerator.cs
- util.cs
- Selection.cs
- _ShellExpression.cs
- DataAdapter.cs
- EtwTrace.cs
- IEnumerable.cs
- WsatConfiguration.cs
- SqlGatherConsumedAliases.cs
- Pens.cs
- UserControlCodeDomTreeGenerator.cs
- IConvertible.cs
- HtmlSelect.cs
- SpellerInterop.cs
- EntityParameter.cs
- NativeMethods.cs
- CachedPathData.cs
- PartialCachingAttribute.cs
- AsyncCompletedEventArgs.cs
- DictionarySurrogate.cs
- PropertyValueChangedEvent.cs
- keycontainerpermission.cs
- TimeSpanValidatorAttribute.cs
- UserMapPath.cs
- PixelFormat.cs
- XmlExpressionDumper.cs
- XmlEntity.cs
- StrokeCollection2.cs
- BufferAllocator.cs
- DbParameterCollection.cs
- AsymmetricAlgorithm.cs
- CodeValidator.cs
- precedingsibling.cs
- TraceSection.cs
- FunctionQuery.cs
- XamlWriter.cs
- StoryFragments.cs
- WorkItem.cs
- SqlWebEventProvider.cs
- PropertyPathConverter.cs
- ZipIORawDataFileBlock.cs
- DataGridCaption.cs
- DataBoundControlAdapter.cs
- UmAlQuraCalendar.cs
- InputScope.cs
- EnumValidator.cs
- ContextDataSource.cs
- WizardDesigner.cs
- DataTemplate.cs
- HashSetEqualityComparer.cs
- XhtmlBasicFormAdapter.cs
- VisualStyleTypesAndProperties.cs
- mediaclock.cs
- CompositeScriptReferenceEventArgs.cs
- NavigationProgressEventArgs.cs
- BaseParagraph.cs
- WindowHideOrCloseTracker.cs
- UserInitiatedNavigationPermission.cs
- mediaeventargs.cs
- ColorAnimation.cs
- ConfigXmlText.cs
- SegmentInfo.cs
- StylusPointProperty.cs
- Environment.cs
- FlowLayoutPanel.cs
- OleDbPermission.cs
- NeedSkipTokenVisitor.cs
- FormDocumentDesigner.cs
- StrongNameKeyPair.cs
- TextTrailingWordEllipsis.cs
- PropertyTabChangedEvent.cs
- OleDbConnectionFactory.cs
- LineVisual.cs
- RuntimeEnvironment.cs
- ContainerFilterService.cs
- XmlDataDocument.cs
- CommandHelper.cs
- FileSystemInfo.cs
- Wizard.cs
- ListViewCommandEventArgs.cs
- TextServicesProperty.cs