Adding Dynamically a row to repeater at particular position
<p>wants to add a TextBox in repeater on Check Box event. on Checked calls JQuery Function and if checked then Values Becomes true and Checks for hdnQuesId,if hdnQuesID==1 and CheckBox Checked it adds A textbox after that checkbox dynamically.</p>

<p>HTML:</p>

<pre><code>&lt;asp:Repeater runat="server" ID="rptMedical" OnItemDataBound="rptMedical_ItemDataBound" &gt;
           &lt;HeaderTemplate&gt;
            &lt;ul class="full question-list"&gt;
                &lt;/HeaderTemplate&gt;
            &lt;ItemTemplate&gt;
                &lt;li class="full"&gt;
                    &lt;p class="question full"&gt;
                        Q.&lt;asp:Label runat="server" ID="lblQuestion" Text='&lt;%# Eval("Question")%&gt;'&gt;&lt;/asp:Label&gt;&lt;/p&gt;
                 &lt;asp:HiddenField runat="server" ID="hdnQuestionCode" Value='&lt;%# Eval("QuestionCode")%&gt;' /&gt;
                 &lt;asp:HiddenField runat="server" ID="hdnQuestionId" Value='&lt;%# Eval("Id")%&gt;' /&gt;

                    &lt;asp:Repeater runat="server" ID="rptMember"&gt;
                        &lt;HeaderTemplate&gt;
                             &lt;ul class="full ans-list member-3"&gt;
                        &lt;/HeaderTemplate&gt;
                        &lt;ItemTemplate&gt;
                      &lt;li class="fl grid js-question-details-holder"&gt;
                          &lt;div class="full answer-lable"&gt;
                             &lt;asp:Label runat="server" ID="lblMemberName" class="fl check-option"&gt;
                                    &lt;label class="switch"&gt;
                                        &lt;input type="checkbox" id="chkAnsr" runat="server" value="false" class="switch-input js-member-question answerCheck"&gt;
                                        &lt;span data-off="No" data-on="Yes" class="switch-label full"&gt;&lt;/span&gt;&lt;span class="switch-handle anim"&gt;
                                            &lt;i class="ui-icon-20 ico-switch-handle"&gt;&lt;/i&gt;&lt;/span&gt;
                                    &lt;/label&gt;
                                &amp;nbsp;&amp;nbsp;&lt;/div&gt;
                              &lt;/div&gt;


                    &lt;/div&gt;
                          &lt;/li&gt;

                        &lt;/ItemTemplate&gt;
                        &lt;FooterTemplate&gt;
                            &lt;/ul&gt;
                        &lt;/FooterTemplate&gt;
                    &lt;/asp:Repeater&gt;
                    &lt;/li&gt;
            &lt;/ItemTemplate&gt;   
             &lt;FooterTemplate&gt;
                 &lt;/ul&gt;
             &lt;/FooterTemplate&gt;

             &lt;/asp:Repeater&gt;
</code></pre>

<p>JQuery:</p>

<pre><code>$('.answerCheck').click(function () {
    var objId = this.id;
    var check = objId.split('_');
    var hdnQuesId =$('#'+ prefix +'rptMedical_hdnQuestionId_'+check[3]).val();
    if ($(this).is(':checked')) {
        $('#' + objId).val("true");
        var ans = $('#' + objId).val();
        if (ans == true &amp;&amp; hdnQuesId != 1)
            {
            $('.noki').addClass('hide');
            }
        else
            {

            var box = document.createElement("input");
            box.setAttribute("type", "text");
            box.setAttribute("value", "text");
            box.setAttribute("runat", "server");
            var x = document.getElementById((this).id);
            x.appendChild(box);
            $('.noki').removeClass('hide');
        }
        }
}
</code></pre>

<p>this didn't add textbox in repater on Check Box Event of Particular row in Repeater  </p>