Name of form is not declared
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:
VB 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:
Code:
</HEAD>
<body topmargin="0">
<form id="formname" runat="server">
Re: Name of form is not declared
Did you declare it at the top of your page class?
VB Code:
Protected WithEvents formname As System.Web.UI.HtmlControls.HtmlGenericControl