Hi steve,
I look at the 4guys article, this seems to work fine if the control is a
datagrid.
If I make my own user control and put on instance of it on a page (called
SimpleControl1)
The user control only has a single text box on it
and use the following code
Dim sb As New StringBuilder
Dim sw As New StringWriter
Dim htmlWriter As New HtmlTextWriter(sw)
SimpleControl1.RenderControl(htmlWriter)
I get an error when I try to do a post back (the above code is in a button
on a PAGE not the user control) saying that
"Control 'SimpleControl1_TextBox1' of type 'TextBox' must be placed inside a
form tag with runat=server"
I am not quite sure why this does not happen with the datagrid in 4guys
example.
If you could offer any advice it would be appreciated.
ideally I would like to send the output of the entire page (including all
user controls).
perhaps I will have to use a third party componenet.
cheers
martin.
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:up***************@TK2MSFTNGP10.phx.gbl...
You can email a page by using the WebRequest and MailMessage classes.
Here are a couple examples:
http://www.aspalliance.com/stevesmit...ailwebsite.asp
http://aspnet.4guysfromrolla.com/articles/091102-1.aspx
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Martin" <ma*******************@martinz.co.nz> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl... Hi,
I have a standard aspx page (form) that contains a few user controls.
Upon form submission the page is validated.
If validation passses then a text based email is sent.
This is all working fine, however what I would like to do is sent the
entire contents of the posted back page as a HTML email.
Is this possible and if so could somebody point me in the right direction
to achieving this.
many thanks in advance.
cheers
martin.