Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Gridview RenderControl Error !Gridview RenderControl Error !
Previous
 
Next
New Post
9/8/2008 10:21 AM
 

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);

 

 

 

 
New Post
9/8/2008 10:41 AM
 

Jikubhai wrote
 

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.

 

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..."; Mail.SendMail(UserInfo.Email, "xxxx@xxxx.com", "", "", DotNetNuke.Services.Mail.MailPriority.Normal, MsgSubject, DotNetNuke.Services.Mail.Mailformat.Html, System.Text.Encoding.UTF8, MsgBody, "", SMTPServer, SMTPAuthentication, SMTPUsername, SMTPPassword);

 

 

{

 

 

 

gvSearchResults.RenderControl(htmlTW);

 

 

 

MsgBody = dataGridHTML;

DotNetNuke.Services.Mail.

}

 

private

 
New Post
9/19/2008 9:40 AM
 

Did you manage to get an answer to this? I'm trying something similar with a tokenized HTML page?

 


Colm Ryan Director
3rd i IT and Business Services Limited

www.actravia.com
Registration and Booking Solutions for Dotnetnuke
www.3rdi.ie
IMCA Registered Management Consulting Practice. Business and IT Strategy, IT Project Management and Product Development
 
New Post
9/19/2008 12:06 PM
 

Try the solution I suggested in this post. it works for getting gridview html for an excel export

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/postid/248713/scope/posts/Default.aspx 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Gridview RenderControl Error !Gridview RenderControl Error !


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out