Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Remove Last Updated Message on Web Capture WebPart

  Asked By: Dario    Date: Jun 14    Category: Sharepoint    Views: 1644

Well after some looking I was unable to find anyone that has removed
the "Web Capture last updated at.." message from the capture web
part. So decided that I would try and tackle this one.

The capture part works by requesting the captured page using
Microsoft.XMLHTTP. It then post the results to an aspx page in the
_wpresources directory. That aspx page in turn uses
WebCaptureWebPart.ClipAndRenderClientCapturedContent to trim the
content down to the requested table. The
ClipAndRenderClientCapturedContent method uses an httpwriter to
write the necessary content to the response.output.

My approach was to keep the method
ClipAndRenderClientCapturedContent from writing directly to
reponse.output and instead substitute my own httpwriter. Then get
the content that was written to it, remove the updated message and
write that to the response.output.

The aspx page that you need to change is called wccapture.aspx you
will find it in the directory \Program Files\Common Files\Microsoft
Shared\web server

Change the following lines in the method RenderCapture()

//HtmlTextWriter writer = new HtmlTextWriter(Response.Output);
StringBuilder renderedOutput = new StringBuilder( );
StringWriter strWriter = new StringWriter(renderedOutput);
HtmlTextWriter writer = new HtmlTextWriter(strWriter);
captureResult = WebCaptureWebPart.ClipAndRenderClientCapturedContent(
Context,writer,Request.InputStream, contentType

CompareInfo comp = CultureInfo.InvariantCulture.CompareInfo;

string modifiedOutput = strWriter.GetStringBuilder().ToString();
int firstTR = comp.LastIndexOf
int length = modifiedOutput.Length;
int lastTR = comp.LastIndexOf
modifiedOutput = modifiedOutput.Remove(firstTR,length-firstTR-




No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Remove Last Updated Message on Web Capture WebPart Or get search suggestion and latest updates.