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
- ReadOnlyAttribute.cs
- WorkflowServiceBehavior.cs
- HtmlTextArea.cs
- CollectionChangedEventManager.cs
- _NegoStream.cs
- EqualityComparer.cs
- RequestCacheEntry.cs
- FtpRequestCacheValidator.cs
- BuildProvider.cs
- ServerValidateEventArgs.cs
- DiagnosticTraceSource.cs
- InputGestureCollection.cs
- ProxyAttribute.cs
- CommandExpr.cs
- HostingEnvironment.cs
- DbParameterHelper.cs
- SubpageParagraph.cs
- TypeNameConverter.cs
- QueryParameter.cs
- TextSelectionHighlightLayer.cs
- XmlCustomFormatter.cs
- DataObject.cs
- SupportingTokenBindingElement.cs
- Triplet.cs
- WmlLabelAdapter.cs
- XmlChildEnumerator.cs
- TextServicesCompartmentEventSink.cs
- RawStylusActions.cs
- TransferMode.cs
- ZipFileInfo.cs
- ConfigurationStrings.cs
- WarningException.cs
- DeclarativeCatalogPart.cs
- ListInitExpression.cs
- configsystem.cs
- SQLInt16.cs
- IIS7UserPrincipal.cs
- PropertyOverridesDialog.cs
- Switch.cs
- followingquery.cs
- AddInAdapter.cs
- GridViewUpdatedEventArgs.cs
- ProgressBar.cs
- ProviderUtil.cs
- Literal.cs
- MTConfigUtil.cs
- TextFormatter.cs
- AuthStoreRoleProvider.cs
- UriScheme.cs
- SchemaNames.cs
- BufferBuilder.cs
- EndpointDiscoveryMetadataCD1.cs
- SmtpTransport.cs
- TemplatePropertyEntry.cs
- DataContract.cs
- MDIControlStrip.cs
- Tablet.cs
- BamlCollectionHolder.cs
- FamilyTypeface.cs
- ColumnMapCopier.cs
- RegionData.cs
- base64Transforms.cs
- UiaCoreTypesApi.cs
- TextServicesLoader.cs
- StrongNameUtility.cs
- DataBindingHandlerAttribute.cs
- SessionStateUtil.cs
- DependencySource.cs
- XomlCompilerResults.cs
- Stack.cs
- RelationshipType.cs
- CultureTable.cs
- CurrentTimeZone.cs
- CellCreator.cs
- SoapAttributes.cs
- XmlValueConverter.cs
- WinEventWrap.cs
- oledbconnectionstring.cs
- CodeTypeDelegate.cs
- RestClientProxyHandler.cs
- ApplicationCommands.cs
- ChangeNode.cs
- DetailsView.cs
- StrokeNode.cs
- LogExtent.cs
- RegexRunner.cs
- MetadataItemEmitter.cs
- ConnectionProviderAttribute.cs
- XmlAttributeCollection.cs
- XPathException.cs
- LazyTextWriterCreator.cs
- BrushValueSerializer.cs
- ContextMarshalException.cs
- xamlnodes.cs
- TraceContextEventArgs.cs
- ScrollProperties.cs
- HtmlHistory.cs
- Common.cs
- Vector3DCollection.cs
- DataGridViewSelectedCellCollection.cs