hmm, tried it several ways now and i still fail to get it validated for html
3.2.
My current page looks like this but it's not working like you can see at
http://validator.w3.org/check?uri=ht...ctype=HTML+3.2
<%@ Page Language="C#" %>
<%@ Register Src="Controls/LoginMainTest.a scx" TagName="LoginM ainTest"
TagPrefix="uc1" %>
<script runat="server">
protected override HtmlTextWriter
CreateHtmlTextW riter(System.IO .TextWriter writer)
{
return new Html32TextWrite r(writer);
}
</script>
<html>
<head runat="server">
<title>Untitl ed Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<uc1:LoginMainT est ID="LoginMainTe st1" runat="server" />
</div>
</form>
</body>
</html>
"Matthias Pieroth" <pi*********@ya hoo.deschreef in bericht
news:ed******** *****@news.t-online.com...
Hello Heron,
"Heron" <no****@nospam. comwrote in message
news:ev******** *****@TK2MSFTNG P03.phx.gbl...
>Hi,
I need to render my site for html 3.2 so I ran into to Html32TextWrite r
and managed to render some usercontrols but how do you create an actual
page?
In the default.aspx I tried to create my login page like this.
protected void Page_Load(objec t sender, EventArgs e)
{
rendered = new StringBuilder() ;
this.LoginMainT est1 = new _LoginMainTest( );
System.IO.TextW riter txtwriter = new System.IO.Strin gWriter(rendere d);
Html32TextWrite r html32writer = new Html32TextWrite r(txtwriter);
Page pg = new Page();
Don't do that. You already have a page. Try "this.Page" , you'll see...
> pg.Controls.Add (this.LoginMain Test1);
Add the control to a Form that has the Attribute runat=server.
> pg.RenderContro l(html32writer) ;
You don't need to call this manually!
Bye,
--
Matthias Pieroth
www.codegod.de - The Page for .NET-developers