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
- RegexWorker.cs
- SymLanguageVendor.cs
- TemplatedMailWebEventProvider.cs
- SimpleFieldTemplateUserControl.cs
- TableCell.cs
- DataTableMappingCollection.cs
- UnhandledExceptionEventArgs.cs
- ObjectConverter.cs
- ClonableStack.cs
- _NegotiateClient.cs
- ReadOnlyCollectionBase.cs
- listitem.cs
- ExpressionCopier.cs
- ButtonChrome.cs
- SqlFactory.cs
- MethodToken.cs
- IfJoinedCondition.cs
- FontFaceLayoutInfo.cs
- ParameterCollection.cs
- SoapSchemaExporter.cs
- TreeNodeStyleCollection.cs
- SafeLibraryHandle.cs
- PeekCompletedEventArgs.cs
- DefinitionUpdate.cs
- DataSetMappper.cs
- CodeMemberMethod.cs
- ImageSourceValueSerializer.cs
- SafeEventLogReadHandle.cs
- JsonGlobals.cs
- HTMLTagNameToTypeMapper.cs
- HttpException.cs
- SQLConvert.cs
- BmpBitmapDecoder.cs
- SafeSecurityHandles.cs
- DataGridViewCheckBoxCell.cs
- ResXResourceSet.cs
- Attribute.cs
- XPathDescendantIterator.cs
- LoginUtil.cs
- UnaryQueryOperator.cs
- TranslateTransform3D.cs
- ValueOfAction.cs
- TreeViewImageKeyConverter.cs
- InstancePersistenceEvent.cs
- ToolboxItemImageConverter.cs
- PeerCollaboration.cs
- FormatVersion.cs
- ErrorWebPart.cs
- MatrixTransform.cs
- _HelperAsyncResults.cs
- ConfigurationSchemaErrors.cs
- SyndicationDeserializer.cs
- OracleEncoding.cs
- ItemChangedEventArgs.cs
- XmlEncoding.cs
- ToolConsole.cs
- EntityParameterCollection.cs
- MemberRelationshipService.cs
- Vector3DCollectionConverter.cs
- MultiBinding.cs
- Symbol.cs
- SubpageParaClient.cs
- HtmlTitle.cs
- ModuleBuilderData.cs
- Point.cs
- FilterQuery.cs
- LinqDataSourceHelper.cs
- DispatchWrapper.cs
- CodeDomSerializerException.cs
- XmlMemberMapping.cs
- TableRowCollection.cs
- UInt32.cs
- TiffBitmapEncoder.cs
- WindowsListViewGroupHelper.cs
- keycontainerpermission.cs
- RegexTree.cs
- ServicePointManager.cs
- updateconfighost.cs
- X509SecurityTokenProvider.cs
- EditorPartChrome.cs
- FileStream.cs
- CheckBox.cs
- EnvelopedSignatureTransform.cs
- SqlServer2KCompatibilityCheck.cs
- EncryptedPackageFilter.cs
- XmlDocumentType.cs
- LoginName.cs
- SendActivityEventArgs.cs
- MailDefinition.cs
- Typography.cs
- ParameterCollection.cs
- ZipIOExtraFieldPaddingElement.cs
- DataSourceCache.cs
- BamlCollectionHolder.cs
- Mutex.cs
- GridViewDeletedEventArgs.cs
- SimplePropertyEntry.cs
- RegistryExceptionHelper.cs
- DocumentDesigner.cs
- InputProcessorProfiles.cs