asp.net mvc - Is it possible to get HTML content between a 'using' -


I have created a new HTML assistant with a CTOR and a disposable function, and during the start of my control, Have written HTML Like it:

  & lt;% use (HTML.BeginScript ()) {%> Var Jan = "Hoi"; Warning (January); & Lt;%}% & gt;   

Is there any way to capture the internal HTML? Textwriter does not override:

  public class MvcScriptWrapper: IDisposable {private readonly memorystream _ms; Private Readonly Text Worker _tw; Private Readonly Text Worker _originalTw; Public MvcScriptWrapper (HtmlHelper htmlHelper) {_ms = New MemoryStream (); _tw = new streamer (_ms); _originalTw = htmlHelper.ViewContext.Writer; HtmlHelper.ViewContext.Writer = _tw; } Public Zero Extract () {_tw.Flush (); _mssec (0, SeekOrigin.Begin); String content; (Using the streamrider sr = new streamrider (_ms)) (original .ttv (sr.ReadToEnd ());} _tw.Dispose ();}}    

To resolve these issues, I said that in addition to having a website written faster than its websites,

edit It also supports a plug-in architecture that can be used to implement HVML postprocessing, which is the hook in the MVC page flow (MVC 2 and 3). For deletion, see.

Call this function to register your post processor.

  MothAction.RegisterExecutor (New Excerptor (New));  

Inner-Vitter works:

  // ctor _originalTw = ((HtmlTextWriter) htmlHelper.ViewContext.Writer Do.); InnerWriter; ((HtmlTextWriter) htmlHelper.ViewContext.Writer). InnerWriter = _tw;    

Comments