Joma Rajab

Joma Rajab

  • NA
  • 110
  • 51.9k

pass value to drop down list from sqldatasource

Jul 21 2016 6:27 AM
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)