Devendra  Kumar

Devendra Kumar

  • NA
  • 517
  • 233.7k

javacript Created textbox values into database using C#

Apr 23 2016 3:28 AM
 
how to insert text box value in database when text box create by java script  
 
 
<script type="text/javascript">
$(document).ready(function () {
$('#slct').change(function () {
var value = $(this).val(); var toAppend = '';
if (value == 1) {
toAppend = "Director Name: <input type='textbox' >&nbsp; DIN <input type='textbox' >"; $("#panel1").html(toAppend); return;
}
if (value == 2) {
toAppend = "Director Name: <input type='textbox' >&nbsp; DIN <input type='textbox' > <br/>Director Name: <input type='textbox' >&nbsp; DIN <input type='textbox' >"; $("#panel1").html(toAppend); return;
}
if (value = 3) {
toAppend = "Director Name: <input type='textbox' >&nbsp; DIN <input type='textbox' >&nbsp; <br/>Director Name: <input type='textbox' >&nbsp; DIN <input type='textbox' >&nbsp; <br/>Director Name: <input type='textbox' >&nbsp; DIN <input type='textbox' >"; $("#panel1").html(toAppend); return;
}
});
});
</script>
 
 
<form id="form1" runat="server">
<div>
<select id="slct">
<option value="1"> 1 </option>
<option value="2"> 2 </option>
<option value="3"> 3 </option>
</select>
<asp:Panel ID="panel1" runat="server"></asp:Panel>
</div>
</form>
 

Answers (1)