Hi Team,
I am having three text boxes in the form.
I need to populate the other two text box values based on the value in the first text box value.
These values are coming from database.
ASPX FILE:
<tr class="FormContainer">
<td style="white-space: nowrap;">
Terminal ID:
</td>
<td>
<telerik:RadTextBox ID="txtTerminalId" runat="server" >
</telerik:RadTextBox>
<asp:RequiredFieldValidator ID="txtTerminalIdValidator" runat="server" Display="Dynamic"
ControlToValidate="txtTerminalId" ErrorMessage="TerminalId can not be empty!"></asp:RequiredFieldValidator>
</td>
</tr> <tr class="FormContainer">
<td style="white-space: nowrap;">
Terminal Name:
</td>
<td>
<telerik:RadTextBox ID="txtTerminalName" runat="server"></telerik:RadTextBox>
</td>
</tr> <tr class="FormContainer">
<td style="white-space: nowrap;">
Terminal Address:
</td>
<td>
<telerik:RadTextBox ID="txtTerminalAddress" runat="server"></telerik:RadTextBox>
</td>
</tr>
When i Type Terminal Id in the textbox,Terminal name and terminal address needs to populate automatically.
These values are coming from the database.
protected void plantIdChanged(object sender, EventArgs e)
{
Int64 plant_id = Convert.ToInt64(txtTerminalId.Text); var depots = loadingManager.GetLoadingSite(plant_id).FirstOrDefault(x => x.Plant_ID == plant_id);
if (depots != null)
{
txtTerminalName.Text = depots.PlantText;
txtTerminalAddress.Text = depots.Street + " " + depots.Zipcode;
}
}
plantIdChanged method is used for get terminal name and terminal address from database based on the terminalid(plant_id).
Need to implement it in Onblur event of the text box.
Can any one please help,how to implement this.
I am having three text boxes in the form.
I need to populate the other two text box values based on the value in the first text box value.
These values are coming from database.
ASPX FILE:
<tr class="FormContainer">
<td style="white-space: nowrap;">
Terminal ID:
</td>
<td>
<telerik:RadTextBox ID="txtTerminalId" runat="server" >
</telerik:RadTextBox>
<asp:RequiredFieldValidator ID="txtTerminalIdValidator" runat="server" Display="Dynamic"
ControlToValidate="txtTerminalId" ErrorMessage="TerminalId can not be empty!"></asp:RequiredFieldValidator>
</td>
</tr> <tr class="FormContainer">
<td style="white-space: nowrap;">
Terminal Name:
</td>
<td>
<telerik:RadTextBox ID="txtTerminalName" runat="server"></telerik:RadTextBox>
</td>
</tr> <tr class="FormContainer">
<td style="white-space: nowrap;">
Terminal Address:
</td>
<td>
<telerik:RadTextBox ID="txtTerminalAddress" runat="server"></telerik:RadTextBox>
</td>
</tr>
When i Type Terminal Id in the textbox,Terminal name and terminal address needs to populate automatically.
These values are coming from the database.
protected void plantIdChanged(object sender, EventArgs e)
{
Int64 plant_id = Convert.ToInt64(txtTerminalId.Text); var depots = loadingManager.GetLoadingSite(plant_id).FirstOrDefault(x => x.Plant_ID == plant_id);
if (depots != null)
{
txtTerminalName.Text = depots.PlantText;
txtTerminalAddress.Text = depots.Street + " " + depots.Zipcode;
}
}
plantIdChanged method is used for get terminal name and terminal address from database based on the terminalid(plant_id).
Need to implement it in Onblur event of the text box.
Can any one please help,how to implement this.