this is what i mean but the code is not inserting. Please any solution on this?
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label24" runat="server" Text=""></asp:Label><br /><%--Modal 1 Start--%><div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span></button><h4 class="modal-title" id="H2">
Details</h4></div><div class="modal-header" style="background-color: #E8F5FD">
<textarea name="comments2" rows="1" cols="20" id="comments2" class=" form-control" placeholder="Comment" ></textarea> </div><div id="modalbody" class="modal-body">
<div class="tblCustomer">
<div>
<span class="pull-left " style="margin-right:8px">
<asp:Image ID="Imageuser" runat="server" ImageUrl='<%# String.Format("PROFILEPHOTOS/{0}",Eval("ImageName").ToString()) %>' class="imageuser media-object img-rounded animated fadeInDown" style="width: 45px; height: 45px;" />
<div class="clearfix"></div>
</span>
<div class="pull-left " style="">
<div class="clearfix"></div>
</div>
<div class="pull-left " style="">
<span class="name" style="font-family: Arial, Helvetica, sans-serif; font-weight: bold"><%# Eval("Name") %></span>
<span class="senddate"><%# Eval("SendDate","{0:MMM ddd,yyyy}" ) %></span>
<span class="username"><%# Eval("UserName") %></span>
</div>
<div class=" " style="">
</div>
<div class="clearfix"></div>
<div class="" style="margin-bottom:4px"></div>
<span class="contentpost" style="font-family: Arial, Helvetica, sans-serif; font-weight: normal"><%# Eval("ContentPost").ToString().Substring(0,180)+"...(Read More)"%></span><br />
<div class="clearfix"></div>
<span>
<asp:Image ID="Image4" runat="server" ImageUrl='<%# String.Format("UserImage/{0}",Eval("ShImageName").ToString()) %>' class="image2user media-object img-rounded animated fadeInDown"
Style="width: 30%; height: 30%;" />
</span>
</div>
</div>
</div>
<div class="modal-footer">
<span>
<asp:LinkButton ID="Buttonsh" runat="server" CssClass="btn btn-info " BorderStyle="Solid" BorderWidth="1" BorderColor="#007ACC" ClientIDMode="Static">
<div class="">
<span class="" style="">
<asp:Label ID="Label28" runat="server" Text="" CssClass="glyphicon glyphicon-edit" Font-Bold="True" Font-Size="Large"></asp:Label>
</span>
<span>
<asp:Label ID="Label29" runat="server" Text="Post" Font-Bold="True" Font-Size="Large"></asp:Label>
</span>
</div>
</asp:LinkButton></span></div></div></div></div><%--Modal 1 End--%>
<script type="text/javascript">
$(document).ready(function () {
// Button 1 click
$('[id*=Buttonpost]').on('click', function () {
var id = $(this).closest('tr').find($('[id*=ProdID]')).text();
$.ajax({
type: "POST",
url: "Home.aspx/InsertCommenttype",
data: "{'id':'" + id + document.getElementById('comments2').value + "'}",
// data: '{id:"' + id + '"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
var table = $("#modalbody").find('div').eq(0).clone(true);
var customers = response.d;
$("#modalbody").find('div').eq(0).remove();
$(customers).each(function () {
$(".name", table).html(this.Name);
$(".imageuser", table).attr('src', 'PROFILEPHOTOS/' + this.Imageuser);
$(".username", table).html(this.UserName);
$(".contentpost", table).html(this.ContentPost);
$(".senddate", table).html(this.SendDate);
$("#modalbody").append(table);
table = $("#modalbody").find('div').eq(0).clone(true);
});
$('#myModal').modal('show');
$('#myModal1').modal('hide');
},
failure: function (response) {
alert(response.d);
},
error: function (response) {
alert(response.d);
}
});
return false;
});
</script>