I have dynamically added textbox in asp.net web form page using javascript as following
<script type="text/javascript">
var i = "Placehoder";
$("#partAdder").click(function () {
newPart =
'<div class="row" id="row">' +
'<div class="col-xl-2">' +
'<div class="form-group">' +
'<input type="text" runat="server" class="form-control form-control-sm" placeholder='+i+' />' +
'</div>' +
'</div>' +
'</div>';
$('#newistrpart').append(newPart);
});
How to pass the i value to the script "using that script i gent +i+ instead of the value"
runat="server"is not a client-side HTML attribute and will do absolutely nothing here. Given theasp.nettag, you may be confusing the difference between client-side code and server-side code.