Yes, I know I forgot the runat="server" but it's still not working.
What I have in my aspx.vb file is:
Protected WithEvents lname As System.Web.UI.WebControls.Label
And then on page load I have:
lname.Text = "Name:"
My HTML is:
<label id="lname" runat="server" for="fname"><input type="text"
size="55" id="fname" name="fname"></input></label>
Well I get this error:
The base class includes the field 'lname', but its type
(System.Web.UI.WebControls.Label) is not compatible with the type of
control (System.Web.UI.HtmlControls.HtmlGenericControl)
I tryied just in case something like:
Protected WithEvents lname As
System.Web.UI.HtmlControls.HtmlGenericControl
Anyway it's not working.
Can somebody please tell me what is wrong here?
Thanks,
Miguel
"Yunus Emre ALPÖZEN [MCAD.NET]" <ye***@msakademik.net> wrote in message
news:ye***@msakademik.net:
just set it runat="server"
--
Thanks,
Yunus Emre ALPÖZEN
BSc, MCAD.NET
"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:uW****************@TK2MSFTNGP10.phx.gbl...
Hello,
I have a label as follows:
<label id="lName" for="name">Name:<input type="text"
id="name"></input></label>
I need to declare the label in my page.aspx.vb so I can access it on page
load. How is it?
Thanks,
Miguel