title: Comment box same as facebook but in asp.net
body: <p>I have created a web application and I have created a page for showing a post the same as Facebook but my comment box is not working in asp.net.</p>
  
  <pre><code>[WebMethod]
  public static string LoadImages( int Skip, int Take ) {
      // string image;
      System.Threading.Thread.Sleep( 2000 );
      StringBuilder GetImages = new StringBuilder();
      // string Imagespath = HttpContext.Current.Server.MapPath("~/networking/image/");
      // string SitePath = HttpContext.Current.Server.MapPath("~/networking");
      //var Files = (from file in Directory.GetFiles(Imagespath) select new { image = file.Replace(SitePath, "") }).Skip(Skip).Take(Take);
      int records = 0;
      var Files = ProductDataManager.GetRequiredPost( 1, 100, ref records ).Skip( Skip ).Take( Take );
  
  
      foreach( var file in Files ) {
          string postimage = null;
          if( file.PostImage != "" ) {
              postimage = file.PostImage.Replace( "\\", "/" ).Substring( 13 );
          }
          string image = null;
          if( file.PostImage != "" ) {
              image = file.ImageUrl.Replace( "\\", "/" ).Substring( 13 );
          }
          GetImages.AppendFormat( String.Format( @"                 
                              &lt;div style='clear: both;'&gt;
                                  &lt;div style='float: left;'&gt;
                                      &lt;img src='{0}' id='userimage1' height='50' width='50' runat='server'/&gt;
                                  &lt;/div&gt;
                                  &lt;div style='float: left; margin-left: 8px; font-family: Arial; font-size: 14px; font-weight: bold;
                                      color: Navy;'&gt;
                                      &lt;span id='ctl00_ContentPlaceHolder1_gdvgrid_ctl06_username1'&gt;{1}&lt;/span&gt;
                                  &lt;/div&gt;
                                  &lt;div style='float: right;'&gt;
  
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;div style='margin-left: 70px; clear: both;'&gt;
                                  &lt;div style='clear: both; color: Black; font-family: Arial; width: 400px;'&gt;
                                      &lt;span id='txtsub1' style='display:inline-block;width:400px;font-family: Arial; font-size: 15px; color: #64635d;'&gt;{2}&lt;/span&gt;
                                  &lt;/div&gt;
                                  &lt;div style='clear: both; font-family: Arial;'&gt;
                                      &lt;img src='{3}' width='400'/&gt;
                                  &lt;/div&gt;
                                  &lt;div style='color: Black; width: 400px; text-align: justify'&gt;
                                      &lt;span style='font-family: Arial;
                                          font-size: 12px; color: #64635d; text-align: justify; line-height: 15px;'&gt;{4}&lt;/span&gt;
                                  &lt;/div&gt;
  
          &lt;div style='float: left; margin-top: 10px; margin-right: 10px;'&gt;
                  &lt;a onclick='$find(&amp;#39;SendMail3&amp;#39;).show();return false;' id='ctl00_ContentPlaceHolder1_gdvgrid_ctl{6}_btnsendenq' href='href='javascript:__doPostBack(&amp;#39;ctl00$ContentPlaceHolder1$gdvgrid$ctl{7}$btnsendenq&amp;#39;,&amp;#39;&amp;#39;)' style='font-size: 12px; color: #6d84b4;' tabindex='-1'&gt;Send Enquiry&lt;/a&gt;
          &lt;/div&gt;
          &lt;div style='float: left; margin-top: 10px; margin-right: 10px;'&gt;
              &lt;a onclick='$find(&amp;#39;Commentdialog&amp;#39;).show();return false;' id='ctl00_ContentPlaceHolder1_gdvgrid_ctl{8}_btnsendenq' href='javascript:__doPostBack(&amp;#39;ctl00$ContentPlaceHolder1$gdvgrid$ctl{9}$lnkcomment&amp;#39;,&amp;#39;&amp;#39;)' style='font-size: 12px; color: #6d84b4;' tabindex='-1'&gt;Comment&lt;/a&gt;
                                  &lt;/div&gt;
  &lt;div style='display: none'&gt;
              &lt;input type='submit' name='ctl00$ContentPlaceHolder1$gdvgrid$ctl{10}$btncomment' value='Comment' id='ctl00_ContentPlaceHolder1_gdvgrid_ctl{11}_btncomment' style='width:100px;'&gt;
  
  &lt;/div&gt;
  
  &lt;div style='clear: both; color: #c0c0c0; font-size: 12px; padding-top: 10px; font-weight: bold;'&gt;
                                      &lt;span id='ctl00_ContentPlaceHolder1_gdvgrid_ctl06_lbldate'&gt;{5}&lt;/span&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  
                              &lt;div style='border-bottom: 2px solid gray; padding-bottom: 10px;'&gt;
                              &lt;/div&gt;
  
                              ", image, file.CompanyIdentity, file.PostTitle, postimage, file.PostDescription, file.CreateDate, file.Userid, file.Userid, file.ScrapID, file.ScrapID, file.ScrapID, file.ScrapID ) );
      }
      return GetImages.ToString();
  }
  </code></pre>