Author: gsr80 | Posted on: 4/22/2009 10:52:24 AM | Views : 288

Hi guys,
I've set up a page to programatically add new users to  my application. I decided against the wizard because I wanted to add additional information about users. I'm having a problem assigning users to roles from the Drop down list. Behind the page load I have the following:
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        DropDownList1.DataSource = Roles.GetAllRoles()
        DropDownList1.DataBind()
    End Sub
 This works fine. I have 2 values, 'Advisor' and 'Manager'. If I select the role 'Manager' for a user, the value 'Advisor' is always written to the database (it also appears first in the drop down list). The code behind the add user button for this procedure is :
    Private Sub AddUserToRole()
   &nbs ...

Go to the complete details ...