Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / WebControls / DataControlButton.cs / 1 / DataControlButton.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System;
using System.Drawing;
using System.Web.Util;
///
/// Derived version of Button used within a DataControl.
///
[SupportsEventValidation]
internal sealed class DataControlButton : Button {
IPostBackContainer _container;
internal DataControlButton(IPostBackContainer container) {
_container = container;
}
public override bool CausesValidation {
get {
return false;
}
set {
throw new NotSupportedException(SR.GetString(SR.CannotSetValidationOnDataControlButtons));
}
}
public override bool UseSubmitBehavior {
get {
return false;
}
set {
throw new NotSupportedException();
}
}
protected sealed override PostBackOptions GetPostBackOptions() {
PostBackOptions options;
if (_container != null) {
options = _container.GetPostBackOptions(this);
if (Page != null) {
options.ClientSubmit = true;
}
}
else {
options = base.GetPostBackOptions();
}
return options;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System;
using System.Drawing;
using System.Web.Util;
///
/// Derived version of Button used within a DataControl.
///
[SupportsEventValidation]
internal sealed class DataControlButton : Button {
IPostBackContainer _container;
internal DataControlButton(IPostBackContainer container) {
_container = container;
}
public override bool CausesValidation {
get {
return false;
}
set {
throw new NotSupportedException(SR.GetString(SR.CannotSetValidationOnDataControlButtons));
}
}
public override bool UseSubmitBehavior {
get {
return false;
}
set {
throw new NotSupportedException();
}
}
protected sealed override PostBackOptions GetPostBackOptions() {
PostBackOptions options;
if (_container != null) {
options = _container.GetPostBackOptions(this);
if (Page != null) {
options.ClientSubmit = true;
}
}
else {
options = base.GetPostBackOptions();
}
return options;
}
}
}
// 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
- _TLSstream.cs
- ImageInfo.cs
- InputReport.cs
- X509InitiatorCertificateServiceElement.cs
- VersionConverter.cs
- PhysicalOps.cs
- CommandConverter.cs
- StringFreezingAttribute.cs
- ListViewItemMouseHoverEvent.cs
- contentDescriptor.cs
- PersistenceTypeAttribute.cs
- SamlDelegatingWriter.cs
- XmlNodeReader.cs
- StrokeNodeData.cs
- BooleanSwitch.cs
- SimpleApplicationHost.cs
- RenderData.cs
- SafeRightsManagementPubHandle.cs
- WorkflowInstanceProvider.cs
- DropDownButton.cs
- StaticTextPointer.cs
- TextLine.cs
- IUnknownConstantAttribute.cs
- ExtendedProperty.cs
- HttpContext.cs
- StringCollectionEditor.cs
- MouseEvent.cs
- RootProfilePropertySettingsCollection.cs
- ACL.cs
- XmlCharCheckingReader.cs
- TextEditorTables.cs
- TypeDelegator.cs
- UrlSyndicationContent.cs
- ProtocolsSection.cs
- HttpCookie.cs
- SoapEnumAttribute.cs
- QilChoice.cs
- SqlDataSourceCommandEventArgs.cs
- DynamicVirtualDiscoSearcher.cs
- TransportListener.cs
- AsyncPostBackTrigger.cs
- oledbmetadatacolumnnames.cs
- SimpleWebHandlerParser.cs
- Vector.cs
- NamespaceInfo.cs
- CompiledRegexRunnerFactory.cs
- WindowsSpinner.cs
- CompatibleComparer.cs
- Blend.cs
- MethodImplAttribute.cs
- EntityTypeBase.cs
- Image.cs
- SafeArrayRankMismatchException.cs
- _ServiceNameStore.cs
- ToolStripPanelRenderEventArgs.cs
- QueryHandler.cs
- XmlNamedNodeMap.cs
- linebase.cs
- CodeCatchClauseCollection.cs
- mediaeventargs.cs
- AttributeConverter.cs
- GcSettings.cs
- DataControlPagerLinkButton.cs
- RouteParser.cs
- DoubleAnimationClockResource.cs
- GCHandleCookieTable.cs
- DiagnosticEventProvider.cs
- BuildManagerHost.cs
- BamlVersionHeader.cs
- COM2ExtendedBrowsingHandler.cs
- MemberInfoSerializationHolder.cs
- TreeNodeSelectionProcessor.cs
- Activity.cs
- StringAnimationUsingKeyFrames.cs
- InvariantComparer.cs
- VectorCollection.cs
- WebBrowser.cs
- BezierSegment.cs
- LoginUtil.cs
- GenericTextProperties.cs
- OracleMonthSpan.cs
- InstanceValue.cs
- SevenBitStream.cs
- InternalResources.cs
- ObjectQuery_EntitySqlExtensions.cs
- GlobalAllocSafeHandle.cs
- ArrayExtension.cs
- SubclassTypeValidatorAttribute.cs
- HyperLinkColumn.cs
- XPathPatternParser.cs
- UriTemplatePathSegment.cs
- AutoCompleteStringCollection.cs
- SmtpSection.cs
- InvalidFilterCriteriaException.cs
- DayRenderEvent.cs
- SectionRecord.cs
- AddInAttribute.cs
- LocalFileSettingsProvider.cs
- MultiAsyncResult.cs
- ImageFormatConverter.cs