if I follow the manual on
http://www.openmymind.net/FAQ.aspx?documentId=45 i
have a problem ... i "converted" it to C# and now it looks like this:
StringBuilder stringBuilder = new StringBuilder();
StringWriter stringWriter;
HtmlTextWriter htmlTextWriter;
try
{
stringWriter = new StringWriter(stringBuilder);
htmlTextWriter = new HtmlTextWriter(stringWriter);
user.RenderControl(htmlTextWriter);
}
finally
{
stringWriter.Close();
htmlTextWriter.Close();
}
Now there was the error at "user.RenderControl(htmlTextWriter);" or even
with "user" with capital u at the beginning.... the method is unknown...
so I changed "user" to "page" ... but now there is this error-message:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
.....
[HttpException (0x80004005): A page can have only one server-side Form tag.]
But there is only one form-tag .... I think it's wrong that i chose "page"
..... what is the right?
I dont know what to do....
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
schrieb im Newsbeitrag news:uH**************@TK2MSFTNGP10.phx.gbl...
Alexander:
Check out: http://www.openmymind.net/FAQ.aspx?documentId=45
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Alexander Widera" <aw**@hrz.tu-chemnitz.de.invalid.de> wrote in message
news:O$*************@TK2MSFTNGP15.phx.gbl... I have a page with the following code for example:
<%@ Page Language="C#" ContentType="text/html"
ResponseEncoding="iso-8859-1" Debug="true"%>
<script runat="server">
void Page_Load(object sender, EventArgs e)
{
texttoview.Text = "this is the text";
}
</script>
<!--#include virtual="/templates/Head.aspx" -->
<title>Title of the page</title>
</head>
<body>
<form runat="server">
<asp:Label runat="server" ID="texttoview" />
</form>
<!--#include virtual="/templates/Footer.aspx" -->
After this page is "generated", or better said the html-code of this
page,
I want to send this html-code by email to someone.
How can i make this possible? On this page could be a button, which
causes
the sending-process on click.
thank you for your help.