I need HELP

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,076
Messages
2,570,565
Members
47,201
Latest member
IvyTeeter

Latest Threads

Top