1

I've tried to copy this example here.

The only change I've made is changing the text that it'll output :

public override System.IO.Stream Open() 
{
    return new System.IO.MemoryStream(System.Text.ASCIIEncoding.ASCII.GetBytes("@inherits System.Web.Mvc.WebViewPage\r\n@{ViewBag.Title = \"About Us\";}\r\n"));
}

But I can't seem to persuade it to evaluate the Razor mark-up.

Any suggestions?

Community
  • 1
  • 1
Sam
  • 1,208
  • 1
  • 9
  • 16

2 Answers2

1

Gah, Exactly this but with the data in a database seems to work :I think it may have something to do with my manually inserted carriage returns ... Oh well

Sam
  • 1,208
  • 1
  • 9
  • 16
0

Try using UTF8 encoding instead of ASCII

  • Yeah - They're all ascii characters, but I did get desperate enough to try that anyway ... it's the same :) – Sam Dec 05 '12 at 16:35