我的页面中有一个asp GridView和一个DetailView。我使用asp ObjectDataSource将数据绑定到我的DetailsView。我从数据层调用一个方法来获取data.method有一个参数(UserIdSender,UserIdReceiver)。我想从选定的行gridview和UserIdReceiver传递来自Logged in参数的UserIdSender参数。我不知道如何检索UserIdReceiver?
<SelectParameters>
<asp:ControlParameter ControlID="AdminGridView" PropertyName="SelectedValue" Name="Senderuserid" DbType="Guid"></asp:ControlParameter>
<asp:Parameter DbType="Guid" Name="ReceiverUserId"></asp:Parameter>
</SelectParameters>
</asp:ObjectDataSource>
答案 0 :(得分:0)
e.InputParameters["ReceiverUserId"] = Membership.GetUser().ProviderUserKey;
对于UserIdSender,请继续: https://msdn.microsoft.com/en-us/library/aa581796.aspx