Click here to Skip to main content
15,898,708 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
please help me...i am making a project on hotel management
i have a problem
i have bind data with combobox using ado.net but i want data of other columns to be retrieve in textbox when i select a particular value of combobox....
i have to submit it tomorrow so plz reply ASAP
Posted
Updated 5-Aug-12 19:33pm
v2

Its not urgent for us..anyways try this..

ASP.NET
<asp:dropdownlist id="DropDownList1" runat="server" onselectedindexchanged="DropDownList1_SelectedIndexChanged" xmlns:asp="#unknown">
        </asp:dropdownlist>
        <asp:textbox id="TextBox1" runat="server"></asp:textbox>

C#
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        TextBox1.Text = DropDownList1.SelectedValue.Trim();
    }



Thanks
Ashish
 
Share this answer
 
v2
I assume this is not a web site, as you did not say it was. Either way, I don't see the issue. Your combo box has properties and events for selection changing, and your textboxes have properties, so set them in your C# code, if this is a windows app.

Who are you submitting this to ? If it's a client, then you're a thief, so I assume it's a class. If you can't do this sort of basic task, it's your teacher you should be talking to. If you could attempt it and post code, then this would be an appropriate place to seek help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900