Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / DataControlButton.cs / 1305376 / 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
- Bits.cs
- Table.cs
- DefinitionProperties.cs
- PackagePartCollection.cs
- GridViewColumnCollection.cs
- BufferedReceiveManager.cs
- WinFormsComponentEditor.cs
- HtmlAnchor.cs
- ASCIIEncoding.cs
- EventOpcode.cs
- SchemaNames.cs
- SplashScreen.cs
- TailPinnedEventArgs.cs
- SimpleBitVector32.cs
- RealizationDrawingContextWalker.cs
- VisualTreeHelper.cs
- ListViewGroupItemCollection.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- ConfigurationLockCollection.cs
- AutomationAttributeInfo.cs
- SessionStateModule.cs
- TransactionState.cs
- DrawingContextWalker.cs
- IndependentAnimationStorage.cs
- PageThemeBuildProvider.cs
- OleServicesContext.cs
- XsltException.cs
- ResolveCriteriaApril2005.cs
- RootCodeDomSerializer.cs
- ContainerVisual.cs
- XmlMapping.cs
- EncodingDataItem.cs
- XPathParser.cs
- ManifestResourceInfo.cs
- sortedlist.cs
- KeyedHashAlgorithm.cs
- DataFieldEditor.cs
- ListBoxItem.cs
- httpapplicationstate.cs
- DrawingAttributeSerializer.cs
- IPEndPoint.cs
- _DynamicWinsockMethods.cs
- DataRecordObjectView.cs
- filewebrequest.cs
- LogicalExpressionEditor.cs
- AQNBuilder.cs
- MiniMapControl.xaml.cs
- ConfigurationSchemaErrors.cs
- ThemeDictionaryExtension.cs
- BaseHashHelper.cs
- DbParameterHelper.cs
- TextSearch.cs
- TextServicesDisplayAttribute.cs
- HtmlInputButton.cs
- EmptyCollection.cs
- XmlSerializationWriter.cs
- VisualCollection.cs
- DataGridItem.cs
- SmiRequestExecutor.cs
- CodeTypeDelegate.cs
- CodeMethodReturnStatement.cs
- SqlTransaction.cs
- DeviceContext.cs
- SqlProfileProvider.cs
- BindingObserver.cs
- TextSerializer.cs
- ImageListUtils.cs
- ReflectEventDescriptor.cs
- CorruptStoreException.cs
- CriticalExceptions.cs
- DesignerOptionService.cs
- RotateTransform.cs
- DropDownButton.cs
- CharacterString.cs
- AutoResetEvent.cs
- Vector3DValueSerializer.cs
- MessageHeaderT.cs
- ImageCodecInfoPrivate.cs
- AutoCompleteStringCollection.cs
- x509store.cs
- CompositeScriptReferenceEventArgs.cs
- SecondaryViewProvider.cs
- FamilyMapCollection.cs
- ListViewTableCell.cs
- TimelineCollection.cs
- TableLayoutPanelCodeDomSerializer.cs
- FullTextLine.cs
- EventLogInternal.cs
- GridItemCollection.cs
- Convert.cs
- CultureTable.cs
- GeneratedCodeAttribute.cs
- DateTimeValueSerializerContext.cs
- X509WindowsSecurityToken.cs
- SafeEventHandle.cs
- Argument.cs
- WebPartConnectionCollection.cs
- CompositeActivityTypeDescriptor.cs
- HttpDebugHandler.cs
- TrackingMemoryStreamFactory.cs