Ghost Cell in IE9 with Repeter Control

IE9 Create an empty cell, or you can say that the ghost cell, with ASP.Net repeater control. I am trying to execute javascript regural expression. Render function to run reg. exp but the page stores several update controls and an error is generated.

Error: sys.webforms.pagerequestmanagerservererrororexception message received from the server cannot be analyzed. ScriptResource.axd

I am trying to use all known links for this error. Please suggest me if you really have ...

thanks

protected override void Render(HtmlTextWriter writer) { using (HtmlTextWriter htmlwriter = new HtmlTextWriter(new System.IO.StringWriter())) { base.Render(htmlwriter); string html = htmlwriter.InnerWriter.ToString(); if ((ConfigurationManager.AppSettings.Get("RemoveWhitespace") + string.Empty).Equals("true", StringComparison.OrdinalIgnoreCase)) { //html = Regex.Replace(html, @"(?<=[^])\t{2,}|(?<=[>])\s{2,}(?=[<])|(?<=[>])\s{2,11}(?=[<])|(?=[\n])\s{2,}", string.Empty); html = Regex.Replace(html, @"(?<=<td[^>]*>)(?>\s+)(?!<table)|(?<!</table>\s*)\s+(?=</td>)", string.Empty); html = html.Replace(";\n", ";"); } writer.Write(html.Trim()); } 

another solution but failure for repeater

 var expr = new RegExp('>[ \t\r\n\v\f]*<', 'g'); document.body.innerHTML = document.body.innerHTML.replace(expr, '><'); 
+4
source share
3 answers

You can directly access the Repeater control (before it is written to the page and displayed by IE) and delete cells based on their index.

0
source

You must remove the spaces between "</td>" and "<td>".

0
source

A very useful script was found to prevent unwanted cells in your html table when rendering in IE9 browser .

 function removeWhiteSpaces() { $('#myTable').html(function(i, el) { return el.replace(/>\s*</g, '><'); }); } 

This is a javascript function that you should call when the page loads (i.e. the onload event)

0
source

All Articles