A
agb
Hi I want to copy the dropdownlist selected item to the the text box.
this is the ascx file ;
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Drop.Attributes.Add("onChange", "SetFocus()")
End Sub
Public Sub SetFocus()
Dim script As String = "<script language=" + Chr(34) + "javascript" +
Chr(34) _
+ ">" + _
"
option=document.forms[0].drop.options[document.forms[0].drop.selectedIndex].
text; " + _
" txt=option; " + _
" document.forms[0].Textbox1.value=txt;" + _
"</script>"
Page.RegisterClientScriptBlock("Focus", agb)
this is the ascx file ;
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Drop.Attributes.Add("onChange", "SetFocus()")
End Sub
Public Sub SetFocus()
Dim script As String = "<script language=" + Chr(34) + "javascript" +
Chr(34) _
+ ">" + _
"
option=document.forms[0].drop.options[document.forms[0].drop.selectedIndex].
text; " + _
" txt=option; " + _
" document.forms[0].Textbox1.value=txt;" + _
"</script>"
Page.RegisterClientScriptBlock("Focus", agb)