PDA

Click to See Complete Forum and Search --> : Name of form is not declared


broadvision123
Jun 14th, 2005, 11:02 AM
Hello,

I'm having a problem with some of my code. I've named the form and in the code it is not recognizing it.

Here is the code:

Dim SB As New StringBuilder
Dim SW As New StringWriter(SB)
Dim htmlTW As New HtmlTextWriter(SW)

formname.RenderControl(htmlTW) ' Here is where Im getting the error

Dim test As String = SB.ToString()
Dim i As String = test


Here is part of the tags:

</HEAD>
<body topmargin="0">
<form id="formname" runat="server">

nemaroller
Jun 14th, 2005, 12:36 PM
Did you declare it at the top of your page class?


Protected WithEvents formname As System.Web.UI.HtmlControls.HtmlGenericControl