G
Goldenrate
Hi there,
I am trying to send via email some information I obtained through the use of
a Wizard. The information is presented to the user on a UserControl called
ucOrderInfo. I placed the following code within another user control called
ucWizardManager to enable that (ucWizardManager contains ucOrderInfo).
TextWriter writer = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(writer);
ucOrderInfo.RenderControl(htw);
string body = htw.ToString();
SendMail(Guest.Email, writer.ToString());
......
I also override VerifyRenderingInServerForm(Control control) on the default
page of the website (its DNN framework), and added to Default.aspx "
EnableEventValidation=false ". It solved the error I was getting for most of
the controls in ucOrderInfo, but when I added the GridView I received this
error: >>> GridView must be placed inside a form tag with run at=server <<<
I did some reading and they all suggest that I do what I've already did. At
this point I have no Idea how to solve it. I could use a useful advise on
how to render the information stored in a UserControl (or any other
control), apply CSS RULES to it, and send it via mail.
Thanks, David
I am trying to send via email some information I obtained through the use of
a Wizard. The information is presented to the user on a UserControl called
ucOrderInfo. I placed the following code within another user control called
ucWizardManager to enable that (ucWizardManager contains ucOrderInfo).
TextWriter writer = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(writer);
ucOrderInfo.RenderControl(htw);
string body = htw.ToString();
SendMail(Guest.Email, writer.ToString());
......
I also override VerifyRenderingInServerForm(Control control) on the default
page of the website (its DNN framework), and added to Default.aspx "
EnableEventValidation=false ". It solved the error I was getting for most of
the controls in ucOrderInfo, but when I added the GridView I received this
error: >>> GridView must be placed inside a form tag with run at=server <<<
I did some reading and they all suggest that I do what I've already did. At
this point I have no Idea how to solve it. I could use a useful advise on
how to render the information stored in a UserControl (or any other
control), apply CSS RULES to it, and send it via mail.
Thanks, David