public async Task OnGetAsync() { InnerRender = await _renderer.RenderToStringAsync("RenderPartial/_RenderPartialMail", new ContactForm { Email = "something@somewhere", Message = "Hello message!", Name = "The Dude", Priority = Priority.Medium, Subject = "This is the subject" }); }
public async Task OnGetAsync() { var dynCode = _sxcMvc.CreateDynCode(TestIds.Blog, null); var path = $"/{MvcConstants.WwwRoot}2sxc/Blog App/_1 Main blog view.cshtml"; InnerRender = await _renderer.RenderToStringAsync( path, new ContactForm { Email = "something@somewhere", Message = "Hello message!", Name = "The Dude", Priority = Priority.Medium, Subject = "This is the subject" }, rzv => { if (rzv.RazorPage is IIsSxcRazorPage asSxc) { asSxc.DynCode = dynCode; asSxc.VirtualPath = path; asSxc.Purpose = Purpose.WebView; } }); }