Update one text field from another source
Hi,
I have a form called "formStudentDemographics". Is is bound to datasource "sqlStudentDemographics". There is a textbox on the insert section of the form call "studentNameID". The format for the field in the DB is int. This textbox has the following code for binding it to the database:
StudentNameID:
<asp:TextBox ID="StudentNameIDTextBox" runat="server" Text='<%# Bind("StudentNameID") %>'></a
When the form loads to the insert section, I need the "studentNameID" to automatically be filled in with or equal to "IDStudentName" which is in the dropdownlist "ddlStudentNamefilter". I've provided the code for that dropdownlist below:
asp:DropDownList ID="ddlStudentNameFilter" runat="server" AutoPostBack="True" DataSourceID="sqlStudentNameFilter"
DataTextField="Student_Name" DataValueField="IDStudentName" Width="208px" Enabled="False" Font-Bold="True">
_______________________
I'm assuming there needs to be code in the codebehind bu am not sure how to do this or how to code it.
Any help would be greatly appreciated.
Thanks,
Leesha
|