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() { DynamicCodeRoot dynCode = null;// _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 ISxcRazorComponent asSxc) { asSxc.DynCode = dynCode; //asSxc.VirtualPath = path; asSxc.Purpose = Purpose.WebView; } }); }