Jon Yarberry написав:
> I just got that exception as well and fixed it with
<FORM
> runat-server> code</FORM>
>
> ------=_Part_6423_9164637.1150987638679
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 147
>
> <br>I just got that exception as well and fixed
it with <FORM runat-server> <span
style="font-style: italic;">code</span>
</FORM><br>
>
> ------=_Part_6423_9164637.1150987638679--
Thanks for reply, Jon
In fact, the textbox is placed inside of the form tag with
runat=server, but when I call RenderControl method of single
control
separately from whole page rendering, it rises the
exception.
Example:
cs:
private void Page_Load(object sender, System.EventArgs e)
{
System.Text.StringBuilder sb = new
System.Text.StringBuilder();
TextBox1.RenderControl(new HtmlTextWriter(new
System.IO.StringWriter(sb)));
string res = sb.ToString();
}
aspx:
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post"
runat="server">
<asp:TextBox id="TextBox1"
runat="server"></asp:TextBox>
</form>
</body>
But maybe I'm going the wrong way.
All I need is HTML presentation of Control at the server
side.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopers googlegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---
|