on my web form I have 2 radio buttons, 1 for staff and 1 for student and a dropdown list box (cbintake) for intake (7,8,9,10,11,12,13)
I also have another dropdown list box which will display a staff/student name(cbperson).
I am having trouble achieving exactly what I want.
i have placed an sqldatasource on the form for (cbperson) listbox
<asp:DropDownList ID="CbPerson" runat="server" DataSourceID="Sql1" DataTextField="FULLNAME" DataValueField="FULLNAME" > </asp:DropDownList><asp:SqlDataSource
ID="Sql1" runat="server" ConnectionString="<%$ ConnectionStrings:conn1 %>"
SelectCommand="SELECT [FULLNAME] FROM [TblStudents] WHERE ([INTAKE] = @INTAKE) ORDER BY [INTAKE]">
<asp:ControlParameter ControlID="CbIntake" Name="INTAKE" PropertyName="SelectedValue"
So, if I select 12 from 'cbintake' all year 12 students are displayed in 'cbperson' - cool!
However, now the plot thickens and I am beginning to think I need to put the above string in VB code to achieve what I want.
Here is what I want...
When the student raido button is selected I want to achieve the above.
When the staff radio button is selected I want to disable 'cbintake' (i have sorted that part) and run a different a different query to populate 'CBperson', for example: SELECT [FULLNAME] FROM [TblStaff]
webconfig connection string
<add name="conn1" connectionString="Data Source=ARAGORN;Initial Catalog=db1SQL;Integrated Security=True" providerName="System.Data.SqlClient"/>
I hope this makes sense :O)
Thanks in advance