Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Populate ListView DropDown List based off entry in same ListView TextBox

$
0
0

This is a tricky one. I have a ListView1. In the InsertTemplate there is 4 textboxs. I am trying to populate three of the other textboxes with information based on what was enetered into the first textbox. I have a SqlDataSource1 that is Populating the ItemTemplate and Alternatingtemplates. When the user types in the textbox it should trigger an OnChange event that will prepopulate the other fields that calls another datasource to fill the other fields in.

Here's my HTML code:

<InsertItemTemplate><tr style="font-family: Calibri" align="center"><td><asp:ImageButton ID="InsertButton" runat="server" CommandName="Insert" ImageUrl="Images/RTT add-icon.png"
                                    ToolTip="Insert" ValidationGroup="ValidationGroup2" /><asp:ImageButton ID="CancelButton" runat="server" CommandName="Cancel" ImageUrl="Images/RTT blue-arrow-undo-icon.png"
                                    ToolTip="Cancel" /></td><td><asp:TextBox ID="ManufacturerTextBox" runat="server"
                                    Text='<%# Bind("Manufacturer") %>' MaxLength="9" /><br /><br /><asp:RequiredFieldValidator ID="RequiredFieldValidator5"
                                    runat="server" ErrorMessage="Required Field" ControlToValidate="ManufacturerTextBox" ValidationGroup="ValidationGroup2"></asp:RequiredFieldValidator></td><td><asp:TextBox ID="ModelTextBox" runat="server" Text='<%# Bind("Model") %>' MaxLength="20" /><br /><br /><asp:RequiredFieldValidator ID="RequiredFieldValidator6"
                                    runat="server" ErrorMessage="Required Field" ControlToValidate="ModelTextBox" ValidationGroup="ValidationGroup2"></asp:RequiredFieldValidator></td><td><asp:TextBox ID="SerialNumTextBox" runat="server"
                                    Text='<%# Bind("SerialNum") %>' MaxLength="20" /><br /><br /><asp:RequiredFieldValidator ID="RequiredFieldValidator7"
                                    runat="server" ErrorMessage="Required Field" ControlToValidate="SerialNumTextBox" ValidationGroup="ValidationGroup2"></asp:RequiredFieldValidator></td><td><asp:TextBox ID="IGBNumTextBox" runat="server" Text='<%# Bind("IGBNum") %>' MaxLength="6" /><br /><asp:RequiredFieldValidator ID="RequiredFieldValidator8"
                                    runat="server" ErrorMessage="Required Field" ControlToValidate="IGBNumTextBox" ValidationGroup="ValidationGroup2"></asp:RequiredFieldValidator><br /><asp:CompareValidator ID="CompareValidator2" runat="server" ErrorMessage="IGB number must be greater than 500000" Operator="GreaterThanEqual" ValueToCompare="500000" ControlToValidate="IGBNumTextBox" ValidationGroup="ValidationGroup2"></asp:CompareValidator></td></tr></InsertItemTemplate>

I have no idea how to write the code behind for this.


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>