Hi,
I am getting the above error in the code behind file of a Web user Control. For example, if I have a textbox on the .ascx file with an ID= txtWebsite (note this is occuring with any control that I put on the .ascx page, DataGrid, Repeaters, etc) in my code behind file I will get the error "Name 'txtWebsite' not declared. The way I am attempting to develop a module is based on the Wrox Professional DotNetNuke Module Programming Book.
txtWebsite is declared, so I am not sure what is causing this. The only thing I have been able to determine, through extensive googling is that the .ascx.designer.vb file is no longer associated with its parent, in this case the .ascx file. In the DNN project I have the designer is no longer showing up as a child to the .ascx file, rather it is inline with is, somewhat like this:
[code]
<a.ascx>
<a.ascx.vb>
<a.ascx.designer.vb>
[/code]
When it should be:
[code]
<a.ascx>
<a.ascx.vb>
<a.ascx.designer.vb>
<b.ascx>
[/code]
Here is a code snippet from the .ascx defining the txtWebsite:
[code]
<td>
<asp:TextBox ID="txtWebsite" runat="server" MaxLength="255" CssClass="NormalTextbox" />
[/code]
And the corresponding .ascx.vb saying where it says txtWebsite is not defined:
[code]
oInfo.SubmitterWebsite = Server.HtmlEncode(txtWebsite.Text)
[/code]
I have tried taking the code from the ascx.designer.vb, per one solution I thought I had found, and putting it directly into the ascx.vb file and then changing the partial class into a normal class, but that just ended up breaking more stuff. Any ideas on either how to get the designer.vb to be associated with its parent correctly or some other way to fix this?
Any help would be much appreciated.
Thanks,
Chris