EMI calculation formula in ASP.NEt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Anni V
    New Member
    • Feb 2009
    • 22

    #1

    EMI calculation formula in ASP.NEt

    Hi
    Can some one please help me with the formula to find the EMI from the textbox values
    1. txtemiconvamoun t
    2. ddltenure
    3. txtemicalcroi

    to display the EMI amount in the textbox
    txtemiamount
    The HTML code is
    Code:
                 
    <asp:TextBox ID="txtemiconvamount" runat="server" Width="97px" TabIndex="1" MaxLength="9" ></asp:TextBox>
     <asp:DropDownList ID="ddltenure" runat="server" AutoPostBack="True" Width="71px">
                            <asp:ListItem Value="Select">Select</asp:ListItem>
                            <asp:ListItem Value="12">12</asp:ListItem>
                            <asp:ListItem Value="18">18</asp:ListItem>
                            <asp:ListItem Value="24">24</asp:ListItem>
                            <asp:ListItem Value="36">36</asp:ListItem>
                            </asp:DropDownList>
    <strong>months</strong></span></td>
                    
    <asp:Textbox ID="txtemicalcroi" runat="server" Font-Bold="True" Width="88px"></asp:Textbox>   
    <asp:TextBox ID="txtemiamount" runat="server" Width="96px" ReadOnly="True"></asp:TextBox>
    I know the formula
    EMI = [(p*r) (1+r)^n]/[(1+r)^n - 1 ]
    where p = principal amount to be converted
    r = rate of interest per month
    n = number of tenure periods
    but I found it difficult to implement in my code behind page,
    please help me if anyone has a better formula or if you can write the code for this formula so that it will calculate the EMI on a button click or text change of the textbox 'txtemicalcroi' .........& display it in th read only text box
    Regards
    Anni
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    You need to be a bit more clear when describing your problem. For instance what is EMI? Equated Monthly Installment?

    What have you tried so far?
    It seems that you already have the equation to preform your calculation and all that you need to do is retrieve the values from the user....

    Comment

    • Anni V
      New Member
      • Feb 2009
      • 22

      #3
      Originally posted by Frinavale
      You need to be a bit more clear when describing your problem. For instance what is EMI? Equated Monthly Installment?

      What have you tried so far?
      It seems that you already have the equation to preform your calculation and all that you need to do is retrieve the values from the user....
      I apologize, however you guessed it right EMI meant Equated Monthly Installments,
      I have tried implementing the same formula but the results are erroraneous & not the exact Emi value I require, however this may not pertain to the code but I guess to the formula
      It would be great if you could provide me some assistance or provide me with a better formula that works,
      Thanking You
      Regards

      Comment

      Working...