I need a little help executing a SQL Stored Procedure from the Code Behind using OnClientItemDoubleClicked.
Here is my ASPX code for the list box:
And my code behind:
I receive the following error when I open the page:
Error: 'RemoveJobRole' is undefined
Any help much appreciated.
Here is my ASPX code for the list box:
<telerik:RadListBox ID="rlb_JobRoles" runat="server"DataKeyField="RoleName" DataSortField="RoleName" DataTextField="RoleName" DataValueField="RoleName" Width="245px" OnClientItemDoubleClicked="RemoveJobRole"> </telerik:RadListBox>And my code behind:
Protected Sub RemoveJobRole(sender As Object, e As System.EventArgs) Handles rlb_JobRoles.SelectedIndexChanged Dim DatabaseName As String = rcb_Database.SelectedValue Dim MemberName As String = Session("UserInRoleName") Dim connectionString = New SqlConnection("server=DO-IT-AB\MSSQLAB;database=AeriesAdmin;UID=itc.sysadmin;PWD=m1s.@dm1n6;") Dim command = New SqlCommand("aa_user_drop_role", connectionString) command.CommandType = CommandType.StoredProcedure command.Parameters.Add("@dbname", SqlDbType.VarChar).Value = DatabaseName + "." command.Parameters.Add("@name_in_db", SqlDbType.VarChar).Value = MemberName command.Connection.Open() command.ExecuteScalar() command.Connection.Close() End SubI receive the following error when I open the page:
Error: 'RemoveJobRole' is undefined
Any help much appreciated.