this is how far ive got now
my code looks an absolute mess and have about 100 commented lines lol![]()
when the page loads it does indeed fill my textbox to the default message, but if i change the drop down list to another selection nothin happens
i need it to change the textbox info from selection of drop down
any ideas
thanks
VB Code:
lstMessage.Items.Add(New ListItem("Default", "c_msg_default")) lstMessage.Items.Add(New ListItem("Message1", "c_msg_custom1")) lstMessage.Items.Add(New ListItem("Message2", "c_msg_custom2")) Dim imessage = lstMessage.SelectedItem.Value If lstMessage.SelectedItem.Value = "c_msg_default" Then Dim cmdselect As SqlCommand cmdselect = New SqlCommand("SELECT c_msg_default from tb_comp_detail where(c_companycode = '" & lblUser.Text & "')", oSQLConn) txtMessageReply.Text = cmdselect.ExecuteScalar().ToString() ElseIf lstMessage.SelectedItem.Value = "c_msg_custom1" Then Dim cmdselect As SqlCommand cmdselect = New SqlCommand("SELECT c_msg_custom1 from tb_comp_detail where(c_companycode = '" & lblUser.Text & "')", oSQLConn) txtMessageReply.Text = cmdselect.ExecuteScalar().ToString() ElseIf lstMessage.SelectedItem.Value = "c_msg_custom1" Then Dim cmdselect As SqlCommand cmdselect = New SqlCommand("SELECT c_msg_custom2 from tb_comp_detail where(c_companycode = '" & lblUser.Text & "')", oSQLConn) txtMessageReply.Text = cmdselect.ExecuteScalar().ToString() End If




Reply With Quote