Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / DynamicData / DynamicData / DataBoundControlParameterTarget.cs / 1305376 / DataBoundControlParameterTarget.cs
namespace System.Web.DynamicData { using System; using System.Collections.Generic; using System.Linq; using System.Web.UI; using System.Web.UI.WebControls; using System.Globalization; internal class DataBoundControlParameterTarget : IControlParameterTarget { private Control _control; public DataBoundControlParameterTarget(Control control) { if (control == null) { throw new ArgumentNullException("control"); } _control = control; } public MetaTable Table { get { return _control.FindMetaTable(); } } public MetaColumn FilteredColumn { get { return null; } } public string GetPropertyNameExpression(string columnName) { // Get the DataKeyPropertyAttribute and use that as the to get the correct property name expression DataKeyPropertyAttribute attribute = _control.GetType().GetCustomAttributes(true).OfType().FirstOrDefault(); if ((attribute != null) && !String.IsNullOrEmpty(attribute.Name)) { return attribute.Name + String.Format(CultureInfo.InvariantCulture, "['{0}']", columnName); } // return String.Empty; } } } // 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
- DiscoveryClientChannelBase.cs
- Point.cs
- ImageListDesigner.cs
- SafeFileMapViewHandle.cs
- FormsAuthenticationEventArgs.cs
- ChangeBlockUndoRecord.cs
- XmlSchemaSimpleContent.cs
- EditorPartChrome.cs
- TreeViewItem.cs
- WebServiceClientProxyGenerator.cs
- DbInsertCommandTree.cs
- CellTreeNodeVisitors.cs
- Thumb.cs
- RequestSecurityToken.cs
- RemoteWebConfigurationHost.cs
- ILGen.cs
- ColumnReorderedEventArgs.cs
- CheckoutException.cs
- Image.cs
- ItemPager.cs
- DecoderNLS.cs
- XsltSettings.cs
- SerTrace.cs
- RepeaterItem.cs
- RuntimeWrappedException.cs
- CultureInfoConverter.cs
- XmlSchemaComplexContentExtension.cs
- BitmapVisualManager.cs
- CalendarDay.cs
- Thread.cs
- PropertyReference.cs
- MouseEventArgs.cs
- UiaCoreTypesApi.cs
- ProfileService.cs
- RegionInfo.cs
- Int16AnimationBase.cs
- SafeFindHandle.cs
- RotateTransform3D.cs
- ImageBrush.cs
- BinaryObjectInfo.cs
- DataMemberConverter.cs
- StringConverter.cs
- OracleBoolean.cs
- DataTemplateSelector.cs
- ContextQuery.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- InputBinder.cs
- SizeAnimationClockResource.cs
- IndentedTextWriter.cs
- CapabilitiesPattern.cs
- BatchServiceHost.cs
- WorkflowInstance.cs
- PagePropertiesChangingEventArgs.cs
- XmlSchemaSimpleContentExtension.cs
- _BasicClient.cs
- SequentialWorkflowHeaderFooter.cs
- MetadataArtifactLoaderComposite.cs
- TabItemAutomationPeer.cs
- RevocationPoint.cs
- EntityClientCacheEntry.cs
- ExceptionNotification.cs
- ReadOnlyDataSource.cs
- Command.cs
- HtmlElementEventArgs.cs
- WindowsFormsSectionHandler.cs
- InstanceValue.cs
- ArcSegment.cs
- XmlParserContext.cs
- PageAdapter.cs
- ParseNumbers.cs
- BinaryObjectReader.cs
- Button.cs
- ListMarkerSourceInfo.cs
- TemplateField.cs
- ModifiableIteratorCollection.cs
- Bezier.cs
- OperationGenerator.cs
- WS2007FederationHttpBindingElement.cs
- ImageList.cs
- OleAutBinder.cs
- PartitionedStream.cs
- OracleDataAdapter.cs
- FixedSOMTableRow.cs
- IndexedSelectQueryOperator.cs
- webclient.cs
- DataControlImageButton.cs
- GroupQuery.cs
- VisualStyleElement.cs
- userdatakeys.cs
- TreeNodeStyleCollection.cs
- _ChunkParse.cs
- PeerChannelFactory.cs
- TypeNameConverter.cs
- SessionStateModule.cs
- SyndicationElementExtensionCollection.cs
- DefaultPropertyAttribute.cs
- SessionEndedEventArgs.cs
- Triplet.cs
- IDictionary.cs
- CompiledELinqQueryState.cs