4
Answers

pass value to drop down list from sqldatasource

Joma Rajab

Joma Rajab

8y
219
1
I am trying to pass value to drop down list based on the current used who current logged in 
I mean I need to show the module name where the current who logged in now  user has these module  these module will be retrieved from module relation table where user id in it and in the logging session the user id is retrieved from users table and they have relation 
 
 
this the code
 
 
 

<asp:SqlDataSource ID="SqlDataSource8" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"

SelectCommand="SELECT [MId], [MName] FROM [ModuleRelation] WHERE [UId]=@uid">

<SelectParameters>

<asp:Parameter Name="uid" Type="string"/>

</SelectParameters>

</asp:SqlDataSource>

please help 

Answers (4)