MVC 2 ViewContenxt. Writer doesn't exist in MVC 1?

Posted by DaveDev on Stack Overflow See other posts from Stack Overflow or by DaveDev
Published on 2010-03-28T16:31:18Z Indexed on 2010/03/28 16:33 UTC
Read the original article Hit count: 191

Filed under:
|
|

I had the following code in an ASP.NET MVC 2 application.

internal TextWriter _writer;
// some stuff
_writer = _viewContext.Writer;
_writer.Write(_tag.ToString(TagRenderMode.EndTag));

I tried to move it to MVC 1 & now it doesn't build any more. I'm getting this error:

'System.Web.Mvc.ViewContext' does not contain a definition for 'Writer'

Can someone point out how I can resolve this? Thanks.

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp.net-mvc