Try our conversational search powered by Generative AI!

Class UpdatePanelPostBackRewritePipe

Rewrite links for postback responses for UpdatePanel.

Inheritance
System.Object
UpdatePanelPostBackRewritePipe
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
public class UpdatePanelPostBackRewritePipe : HtmlRewritePipe
Remarks

The format of the Response from System.Web.UI.UpdatePanel is content.length|type|id|content| e.g. 110|updatePanel|ctl00_MainRegion_MainContentRegion_MainBodyRegion_up|<a href="/Templates/Public/Pages/Page.aspx?id=56&epslanguage=en">a linker page</a>|

Constructors

UpdatePanelPostBackRewritePipe(Object, Encoding, EventHandler<HtmlRewriteEventArgs>)

Constructor

Declaration
public UpdatePanelPostBackRewritePipe(object context, Encoding encoding, EventHandler<HtmlRewriteEventArgs> urlRewriteHandler)
Parameters
Type Name Description
System.Object context

The context for the rewrite

System.Text.Encoding encoding

The encoding to use

System.EventHandler<HtmlRewriteEventArgs> urlRewriteHandler

The event handler to be invoked when a URL should be rewritten.

Properties

IsUpdatePanelPostback

Indicates if current request is an ajax postback from an UpdatePanel. This is identified by checking for POST request with header "x-microsoftajax" and a response type text/plain

Declaration
public static bool IsUpdatePanelPostback { get; }
Property Value
Type Description
System.Boolean

Methods

RewriteToEnd(TextReader, TextWriter)

Rewrites the source stream to the end, sending the result to the writer. The implementation will look for occurrences of format content.length|type|id|content| which is the output from UpdatePanel. For found occurrences the content part will be parsed for links which will be rewritten to FURL format. The output is in the same format as from the UpdatePanel but with FURL links.

Declaration
public override void RewriteToEnd(TextReader reader, TextWriter writer)
Parameters
Type Name Description
System.IO.TextReader reader
System.IO.TextWriter writer
Overrides

Extension Methods