Add Form Textbox Data Dynemically and send data to databae mvc c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mohammadishaq
    New Member
    • Jan 2021
    • 1

    Add Form Textbox Data Dynemically and send data to databae mvc c#

    I need to send data to database with dynamic textbox value. mvc c#


    Code:
     <form id="fromdata">
            <table id="tpvt" border="1" cellpadding="4">
                <tbody>
                    <tr>
                        <td><h6 class="text-left">Company Name</h6><input type="text" name="CompName[]" placeholder="Company Name" id="CompName" value="" class="name_list p-0 m-0" /></td>
                        <td><h6 class="text-left">Region</h6><input type="text" name="Region[]" id="Region" placeholder="Region" value="" class=" name_list" /> </td>
                        <td><h6 class="text-left">Office Address</h6><input type="text" name="OffAdd[]" id="OffAdd" placeholder="Office Address" value="" class=" name_list p-0 m-0" /><input type="button" name="btnadd" id="btnadd" value="+" class="text-danger" /></td>
                        <td><h6 class="text-left">Telephone</h6><input type="text" name="Tele[]" id="Tele" value="" placeholder="Telephone" class=" name_list p-0 m-0" /> <input type="button" name="btnadd" id="btntele" value="+" class="text-danger" /></td>
                        <td><h6>Name</h6>&nbsp;<input type="text" name="NameOwner[]" id="NameOwner" placeholder="Name" value="" class=" name_list p-0 m-0" /><input type="button" name="btnadd" value="+" class="text-danger" /></td>
                        <td><h6>Contact No</h6><input type="text" name="ContNo[]" id="ContNo" placeholder="Contact No" value="" class=" name_list p-0 m-0" /> <input type="button" name="btnadd" value="+" class="text-danger" /></td>
                        <td><h6>Designation</h6>&nbsp;<input type="text" name="Desig[]" id="Desig" placeholder="Designation" value="" class=" name_list p-0 m-0" /><input type="button" name="btnadd" value="+" class="text-danger" /></td>
                    </tr>
    
                    <tr>
                        <td><h6>Email</h6><input type="text" name="Email[]" id="Email" placeholder="Email" value="" class=" name_list p-0 m-0" /> <input type="button" name="btnadd" value="+" class="text-danger" /></td>
                        <td><h6>Decription</h6>&nbsp;<input type="text" name="Descp[]" placeholder="Discription" id="Descp" value="" class=" name_list p-0 m-0" /></td>
                        <td><h6>GSTN No</h6><input type="text" name="Gstno[]" id="Gstno" placeholder="G.S.T No" value="" class=" name_list p-0 m-0" /> </td>
                        <td><input type="submit" id="btnSubmit" value="Submit" class="btn btn-outline-danger p-1" /></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
    
    
    
                </tbody>
            </table>
Working...