c# - Select name in autocomplete text box then load mobile no in 2nd text box -
There are two fields in my database table: After you select the text, some events need to be fire, Give the button name and
mobile no , And two text boxes in a form are an autocomplete text box by getting names from my first textbox database. I want that when I select
name in the text box, then load it into another text box
mobile no Can anyone help it?
changed the private zero text box 1_Text (object sender, EventArgs e) {AutoComplete (); } Public Zero Autocomplete () {SqlConnection conn = New SqlConnection (@ "Database Source ....."); conn.Open (); Autocomplete column compilation AutoItem = new auto complete column compilation (); SQL Commands Command = New SQL Commands ("Select from Table 1", Kon); SqlDataAdapter adp = new SqlDataAdapter (command); DataTable TBL = New DataTable (); Adp.fill (tbl); Foreign Currency (Datarao RW in TBL RO) {Autime. Ed (rw ["name"]. Tostrings ()); } Textbox1.AutoCompleteMode = AutoCompleteMode.Suggest; textbox1.AutoCompleteSource = AutoCompleteSource.CustomSource; Textbox1.AutoCompleteCustomSource = AutoItem; }}
Get a mobile number and do not use the mobile number name on click event of that button
Comments
Post a Comment