2010-12-29 17 views
3

私はEntityDataSourceを持っており、WHEREにLocal Variable Type:GUIDを設定する必要があります。EntityDataSourceのWhereParametersのパラメータを設定する方法

私の問題は、ローカル変数GUidをどこの操作のためにEntityDataSourceに送ることができないのですか。

また、私はControlParameter <asp:ControlParameter Name="UserId" />を使用し、文字列で変換された私のGuidのTextプロパティ付きのLabelプロパティを使用しようとしました。しかし、動作しません。

方法

<asp:EntityDataSource ID="EntityDataSourceListAuthors" runat="server" 
     AutoGenerateWhereClause="True" 
     ConnectionString="name=CmsConnectionStringEntityDataModel" 
     DefaultContainerName="CmsConnectionStringEntityDataModel" 
     EnableFlattening="False" EntitySetName="CmsAuthors" Where="" 
     EntityTypeFilter="" Select=""> 
     <WhereParameters> 
      <asp:Parameter Name="UserId" /> 
     </WhereParameters> 
    </asp:EntityDataSource> 

答えて

5

tehの問題を解決するためのソリューションよ私の問題任意のアイデア:

http://www.leftslipper.com/ShowFaq.aspx?FaqId=11:Object型のカスタムパラメータ

便利なリソースを追加する

関連する問題