This is my code
var _CountJK = 0;
function btnAddJK_onclick() {
String _txtID="txtJK"+_CountJK;
var d = document.getElementById("divJK");
d.innerHTML += "
";_CountJK++;
}
script>
Here,
When i create new textbox that ID of the textbox needs to change.
thats what i created variable _CountJK & i incremented that.
so when i user clicks add button again that count has to be increase & it has to assign to its ID
Its not coming
Can anybody give idea how to do this..


Ajitender VijayRank #6,843 · 255 reputationPosted Jan 27, 2012, 5:24 AM EST
Please check this
but control ID will lost if page post back
..........................................................................................................................................................
If this post helps you, then mark as "Correct Answer"
Thank
Ajitender vijay
SIVARank #2,303 · 613 reputationPosted Jan 27, 2012, 6:32 AM EST
Ajitender VijayRank #6,843 · 255 reputationPosted Jan 27, 2012, 8:18 AM EST
Try this
-------------------------------------------------------------------------
If this post helps you, then mark as "Correct Answer "