$("#gridhvac input[name$='ddlhvacmake_rev']").change(function () { if (this.value == "Other") { $("#gridhvac input[name$='txtother_rev']").attr("style","display: block;"); } else { $("#gridhvac input[name$='txtother_rev']").attr("style", "display: none;"); } });
<asp:TemplateField HeaderText="MAKE"> <EditItemTemplate> <asp:DropDownList ID="ddlhvacmake" runat="server"> <asp:ListItem>1</asp:ListItem> <asp:ListItem>2</asp:ListItem> <asp:ListItem>3</asp:ListItem> <asp:ListItem>4</asp:ListItem> <asp:ListItem>Other</asp:ListItem> </asp:DropDownList> <br /> <asp:TextBox runat="server" ID="txtother" Style="display: none;"/> </EditItemTemplate> <ItemTemplate> <asp:Label ID="lblhvacmake" runat="server" Text='<%#Eval("MAKE") %>'/> </ItemTemplate> <FooterTemplate> <asp:DropDownList ID="ddlhvacmake_rev" runat="server"> <asp:ListItem>1</asp:ListItem> <asp:ListItem>2</asp:ListItem> <asp:ListItem>3</asp:ListItem> <asp:ListItem>4</asp:ListItem> <asp:ListItem>Other</asp:ListItem> </asp:DropDownList> <br /> <asp:TextBox runat="server" ID="txtother_rev" Style="display: none;"/> </FooterTemplate> </asp:TemplateField>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)