Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / DynamicData / DynamicData / DynamicQueryStringParameter.cs / 1305376 / DynamicQueryStringParameter.cs
using System.Collections.Generic; using System.Globalization; using System.Web.DynamicData.Util; using System.Web.Resources; using System.Web.UI; using System.Web.UI.WebControls; namespace System.Web.DynamicData { ////// DynamicQueryStringParameter allows a datasource to have its primary key easily fed from the query string. /// It does not require any attributes, and works even for multi-part primary keys. /// public class DynamicQueryStringParameter : Parameter, IWhereParametersProvider { ////// See IWhereParametersProvider.GetWhereParameters /// public virtual IEnumerableGetWhereParameters(IDynamicDataSource dataSource) { var table = MetaTableHelper.GetTableWithFullFallback(dataSource, HttpContext.Current.ToWrapper()); // check makes no sense as the above call will throw //if (table == null) { // return new Parameter[0]; //} return RouteParametersHelper.GetColumnParameters(table, Name); } /// /// same as base /// /// /// ///protected override object Evaluate(HttpContext context, Control control) { // If this gets called, it means we never had a chance to expand the parameter. Give an error // telling the user to use a DynamicDataManager throw new InvalidOperationException(String.Format( CultureInfo.CurrentCulture, DynamicDataResources.DynamicParameter_NeedExpansion, typeof(DynamicQueryStringParameter).Name)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Odbc32.cs
- COM2EnumConverter.cs
- SoapHeaders.cs
- ButtonChrome.cs
- WindowsAuthenticationModule.cs
- WindowsIPAddress.cs
- DataRow.cs
- PcmConverter.cs
- SerializableAttribute.cs
- CqlWriter.cs
- ApplicationGesture.cs
- ILGenerator.cs
- Column.cs
- PermissionSet.cs
- MonikerSyntaxException.cs
- ProcessHostServerConfig.cs
- SpotLight.cs
- SpecularMaterial.cs
- Compilation.cs
- QilFactory.cs
- ObjRef.cs
- SpecialFolderEnumConverter.cs
- ItemAutomationPeer.cs
- EncryptedType.cs
- DataSourceCollectionBase.cs
- SQLSingle.cs
- LinkButton.cs
- OdbcEnvironmentHandle.cs
- UTF7Encoding.cs
- OdbcUtils.cs
- Clause.cs
- BasicExpandProvider.cs
- CodeExpressionCollection.cs
- SectionInformation.cs
- RemoteEndpointMessageProperty.cs
- HideDisabledControlAdapter.cs
- ImageDesigner.cs
- CollectionContainer.cs
- DataGridViewComboBoxCell.cs
- updateconfighost.cs
- ContentElement.cs
- Polygon.cs
- Timeline.cs
- DispatcherFrame.cs
- AmbientProperties.cs
- MaskedTextBox.cs
- HttpDictionary.cs
- PeerNameRecordCollection.cs
- SelectQueryOperator.cs
- SetterBaseCollection.cs
- TableLayoutCellPaintEventArgs.cs
- NavigationWindowAutomationPeer.cs
- HttpConfigurationSystem.cs
- DeferredRunTextReference.cs
- RouteValueDictionary.cs
- CompilerScopeManager.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- ConfigPathUtility.cs
- TableLayoutStyleCollection.cs
- XmlNamespaceDeclarationsAttribute.cs
- OperationResponse.cs
- PersistenceTypeAttribute.cs
- ViewValidator.cs
- WmlPanelAdapter.cs
- BamlTreeMap.cs
- DataControlButton.cs
- WindowsListViewGroupHelper.cs
- BackgroundFormatInfo.cs
- ControllableStoryboardAction.cs
- QueryResultOp.cs
- WmfPlaceableFileHeader.cs
- HttpHandlersSection.cs
- OleDbConnection.cs
- DefaultParameterValueAttribute.cs
- PartitionerQueryOperator.cs
- MasterPage.cs
- ImageFormat.cs
- PointAnimation.cs
- PlainXmlSerializer.cs
- TemplatedAdorner.cs
- ToolStripOverflowButton.cs
- DebugView.cs
- SymmetricAlgorithm.cs
- KeyMatchBuilder.cs
- PageSetupDialog.cs
- DesignBindingConverter.cs
- DatePickerAutomationPeer.cs
- URLMembershipCondition.cs
- StreamResourceInfo.cs
- RegistryConfigurationProvider.cs
- UIntPtr.cs
- BaseDataBoundControl.cs
- GeneratedCodeAttribute.cs
- MULTI_QI.cs
- DetailsViewRowCollection.cs
- WebScriptEnablingElement.cs
- DesignerToolStripControlHost.cs
- Frame.cs
- TypedTableBaseExtensions.cs
- ConstructorBuilder.cs