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
- CalendarDataBindingHandler.cs
- ScrollViewerAutomationPeer.cs
- DmlSqlGenerator.cs
- CallContext.cs
- SchemaEntity.cs
- Geometry.cs
- MatrixCamera.cs
- objectquery_tresulttype.cs
- MenuItem.cs
- followingsibling.cs
- XmlSchemaInferenceException.cs
- XhtmlBasicCommandAdapter.cs
- SqlProfileProvider.cs
- DataGridRowAutomationPeer.cs
- CodeMemberEvent.cs
- DocumentViewerBaseAutomationPeer.cs
- RegexCompilationInfo.cs
- ActivityExecutionFilter.cs
- XpsFontSubsetter.cs
- GridItem.cs
- HtmlString.cs
- SoapMessage.cs
- Ipv6Element.cs
- XmlWhitespace.cs
- CountAggregationOperator.cs
- SetterBase.cs
- XMLSchema.cs
- NativeMethods.cs
- StoreContentChangedEventArgs.cs
- _NtlmClient.cs
- ClientEventManager.cs
- QuaternionKeyFrameCollection.cs
- IPPacketInformation.cs
- ExtendedTransformFactory.cs
- CacheForPrimitiveTypes.cs
- VirtualPathUtility.cs
- SapiRecoContext.cs
- BinaryObjectInfo.cs
- XmlAutoDetectWriter.cs
- __Error.cs
- _TLSstream.cs
- UrlMappingsModule.cs
- IHttpResponseInternal.cs
- SafeEventLogReadHandle.cs
- XPathDescendantIterator.cs
- DbRetry.cs
- SqlFacetAttribute.cs
- NavigationWindowAutomationPeer.cs
- XamlSerializerUtil.cs
- SchemaNotation.cs
- InstanceDescriptor.cs
- Point4D.cs
- CommandExpr.cs
- Method.cs
- InstanceStore.cs
- CapacityStreamGeometryContext.cs
- ProtectedProviderSettings.cs
- GeneralTransformGroup.cs
- Filter.cs
- TimeEnumHelper.cs
- SqlCommandSet.cs
- StringWriter.cs
- Menu.cs
- SystemGatewayIPAddressInformation.cs
- ArrayElementGridEntry.cs
- Baml2006SchemaContext.cs
- SoapParser.cs
- ProtocolsConfiguration.cs
- HtmlHistory.cs
- CodeObject.cs
- ReadOnlyCollection.cs
- Button.cs
- CustomErrorCollection.cs
- TableFieldsEditor.cs
- XmlSerializationWriter.cs
- XmlSchemaSimpleTypeList.cs
- LayoutDump.cs
- DbConnectionPoolGroupProviderInfo.cs
- FileIOPermission.cs
- X509SecurityTokenParameters.cs
- TabItemWrapperAutomationPeer.cs
- ArrangedElement.cs
- RoleManagerEventArgs.cs
- SecurityDescriptor.cs
- AtlasWeb.Designer.cs
- DbUpdateCommandTree.cs
- SHA512Managed.cs
- SmiMetaDataProperty.cs
- HierarchicalDataSourceConverter.cs
- IPCCacheManager.cs
- RtfControlWordInfo.cs
- PerformanceCounterPermissionAttribute.cs
- DistinctQueryOperator.cs
- InputEventArgs.cs
- SubordinateTransaction.cs
- DrawingCollection.cs
- SecurityKeyIdentifier.cs
- MessageDecoder.cs
- ModelFunction.cs
- RadialGradientBrush.cs