Hey guys,
Im not very good at programming but ive a huge project and i needed help on something.
The basic thing is that im making a project for a doctors hospital
Now im working on the prescrption and i wanted the doctor to be able to select the patient from a list of patients which are displayed in a drop down list. From the drop down list, the address(street suburb and postcode) are then displayed as the value is changed. I want the values to be displayed in a textbox or a label,but im not sure how too.I think its somethng to do with code, bt i have no clue on how to code in vb:S
Can someone please help?
Ive got the code here:
<!--This is the Data source for the patient Name to display-->
<asp:SqlDataSource ID="SqlDataSource12" runat="server"
ConnectionString="<%$ ConnectionStrings:projectConnectionString %>"
SelectCommand="SELECT [patient_ID], firstname + ' ' + lastname AS name FROM [Patient_table]">
</asp:SqlDataSource>
Patient Name:
<asp:dropdownlist ID="patient_IDTextBox" runat="server" DataSourceID="SqlDataSource12" DataTextField="name" DataValueField="patient_ID"/>
<br/>
<--! this is the data source for patient details i.e address to display-->
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:projectConnectionString %>"
SelectCommand="SELECT patient_ID, st_address,suburb,postcode FROM Patient_table WHERE patient_ID=@patid ">
<SelectParameters>
<asp:ControlParameter Name="patid" Type="int32" ControlID="patient_IDTextBox" PropertyName="SelectedValue"/>
</SelectParameters>
</asp:SqlDataSource>
Suburb:
<asp:Label ID="patid1" runat="server" DataSourceID="SqlDataSource3" Text='<%# Eval("st_adress") %>' /><br />
Street Address:
<asp:Label ID="patid2" runat="server" DataSourceID="SqlDataSource3" Text='<%# Eval("suburb") %>' /><br />
Post Code:
<asp:Label ID="patid3" runat="server" DataSourceID="SqlDataSource3" Text='<%# Eval("postcode") %>' />