public void Render() { if (hasRendered) { throw new InvalidOperationException(Resources.TextResource.YouCannotCallRenderMoreThanOnce); } Write(ViewContext.HttpContext.Response.Output); hasRendered = true; }