Click here to Skip to main content
15,914,447 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
<asp:DropDownList ID="ddl20" onChange="display()" runat="server" AutoPostBack="True" Height="19px" Width="105px">
                         <asp:ListItem Value="DutyAmount">Duty Amount
                           <asp:ListItem Value="SurchargeFee">Surcharge Fee
                           <asp:ListItem Value="BondFee">Bond Fee
                           <asp:ListItem Value="DamagesFee">Damages Fee
                           <asp:ListItem Value="PayLeav">Pay Leave
                           <asp:ListItem Value="ServiceBill">Service Bill
                          <asp:ListItem Value="LawyerFee">Lawyer Fee  
                                
                    


<tbody id="DutyAmount" style="display:none"  runat="server">
            <tr>
                 
                <td class="auto-style27">Duty Amount</td>
                <td class="auto-style28" colspan="3">
                    <asp:TextBox ID="txtDutyAmount" runat="server">
                </td>
                <td class="auto-style28" colspan="3">
                    Fine Amount</td>
                <td class="auto-style28" colspan="3">
                    <asp:TextBox ID="txtFineAmount" runat="server">
                </td>
                <td class="auto-style28" colspan="3">
                     </td>
            </tr>
          
                
        
            <tbody id="SurchargeFee" style="display:none"  runat="server">
            <tr>
                <td class="auto-style27">Surcharge Fee</td>
                <td class="auto-style50" colspan="2">
                    <asp:TextBox ID="txtSurchargeFee" runat="server">
                </td>
                <td class="auto-style43" colspan="3"</td>
                <td class="auto-style8"</td>
                <td class="auto-style5" colspan="2">
                     </td>
                <td class="auto-style53" colspan="2"</td>
                <td class="auto-style8" colspan="2"</td>
                <td class="auto-style13"</td>
            </tr>
                
            <tbody id="BondFee" style="display:none"  runat="server">
            <tr>
                <td class="auto-style45">Bond Fee</td>
                <td class="auto-style52" colspan="2">
                    <asp:TextBox ID="txtBondFee" runat="server">
                </td>
                <td class="auto-style43" colspan="3"></td>
                <td class="auto-style8"></td>
                <td class="auto-style5" colspan="2">
                    </td>
                <td class="auto-style53" colspan="2"></td>
                <td class="auto-style8" colspan="2"></td>
                <td class="auto-style13"></td>
            </tr>
                
             <tbody id="DamagesFee" style="display:none"  runat="server">
            <tr>
                <td class="auto-style27">Damages Fee</td>
                <td class="auto-style50" colspan="2">
                    <asp:TextBox ID="txtDamagesFee" runat="server">
                </td>
                <td class="auto-style43" colspan="3"</td>
                <td class="auto-style8"</td>
                <td class="auto-style5" colspan="2">
                     </td>
                <td class="auto-style53" colspan="2"</td>
                <td class="auto-style8" colspan="2"</td>
                <td class="auto-style13"</td>
            </tr>
                 
             <tbody id="PayLeav" style="display:none"  runat="server">
            <tr>
                <td class="auto-style27">Pay Leave Due</td>
                <td class="auto-style50" colspan="2">
                    <asp:TextBox ID="txtPayLeaveDue" runat="server">
                </td>
                <td class="auto-style43" colspan="3"</td>
                <td class="auto-style8"</td>
                <td class="auto-style5" colspan="2">
                     </td>
                <td class="auto-style53" colspan="2"</td>
                <td class="auto-style8" colspan="2"</td>
                <td class="auto-style13"</td>
            </tr>
                 
            <tbody id="LawyerFee" style="display:none"  runat="server">
            <tr>
                <td class="auto-style27">Lawyer's Fee</td>
                <td class="auto-style50" colspan="2">
                    <asp:TextBox ID="txtLawyersFee" runat="server">
                </td>
                <td class="auto-style43" colspan="3"> </td>
                <td class="auto-style8"> </td>
                <td class="auto-style5" colspan="2">
                     </td>
                <td class="auto-style53" colspan="2"> </td>
                <td class="auto-style8" colspan="2"> </td>
                <td class="auto-style13"> </td>
            </tr>
                
              <tbody id="ServiceBill" style="display:none"  runat="server">
            <tr>
                <td class="auto-style27">Service Bill</td>
                <td class="auto-style50" colspan="2">
                    <asp:TextBox ID="txtServiceBill" runat="server">
                </td>
                <td class="auto-style43" colspan="3"> </td>
                <td class="auto-style8"> </td>
                <td class="auto-style5" colspan="2">
                     </td>
                <td class="auto-style53" colspan="2"> </td>
                <td class="auto-style8" colspan="2"> </td>
                <td class="auto-style13"> </td>
            </tr>
Posted
Updated 25-Sep-13 23:19pm
v2
Comments
Anurag Sinha V 26-Sep-13 5:21am    
Where and how is the OnChange event defined??
Please elaborate your question.

-Anurag
asna.azmeel 26-Sep-13 5:44am    
i want to display table rows based on dropdown selection, it is not working
here is the code behind the code
protected void ddl20_SelectedIndexChanged(object sender, EventArgs e)
{
ddl20.Attributes.Add("onchange", "display();");
}
Anurag Sinha V 26-Sep-13 5:49am    
where and how is display(); defined?
Thanks7872 26-Sep-13 5:42am    
Its strange that you won't help from some one and you don't even bother to explain it properly. What do you mean by not working? This is just irrelevant code dump.There is nothing to do with the code of table you posted here.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900