Hello,
I am getting an error when i use gridview.rendercontrol. In the gridview, i have a checkbox, two labels and an image. I have to get the gridview HTML without the checkbox. how i can do this, the error which i receive when using rendercontrol is :
Control 'dnn_ctr403_ViewProductSearch_rlSaveName_gvSearchResults' of type 'GridView' must be placed inside a form tag with runat=server.
Please see the code below which i use to extract the gridview html.
private
void SendEmail()StringBuilder SB = new StringBuilder();StringWriter SW = new StringWriter(SB);HtmlTextWriter htmlTW = new HtmlTextWriter(SW);string dataGridHTML = SB.ToString();string MsgText = "hello";
MsgSubject = "Message Subject Goes Here...";
MsgBody = dataGridHTML;
DotNetNuke.Services.Mail.
}
Mail.SendMail(UserInfo.Email, "sureshvijayan@gmail.com", "", "", DotNetNuke.Services.Mail.MailPriority.Normal, MsgSubject, DotNetNuke.Services.Mail.Mailformat.Html, System.Text.Encoding.UTF8, MsgBody, "", SMTPServer, SMTPAuthentication, SMTPUsername, SMTPPassword);
{
gvSearchResults.RenderControl(htmlTW);