Login
Register
17-05-2008

Resources for the DotNetNuke Community
Join WebHost4Life.com
Support this site

  Support forums  

You need to be logged in in order to post to this forums.
SearchForum Home
  DotNetNuke Development  HelloWorld Tutorial  TextBox1 not de...
 TextBox1 not declared
 
imgOfflinepirataceleste
2 posts
Joined
5/2/2006

TextBox1 not declared
Posted: 02 May 06 2:06 PM

Hello

I've got the same problem in the EditHelloWorld control (with TexBox1) and in the Settings control (with Checkbox1).

Both give the same diagnostic (TextBox1 or Checkbox1 was not declared) when trying to get or set some property of my form fields mentioned above (getting or setting the Text or Checked property respectively).

Have any of you an idea of what I'm missing?

Best regards

Martin

PS: I've added these form fields from the WYSIWYG Editor in VS.net 2003. I'm working with DNN 3.2.2 and SQL 2000, IIS 5 and W2K Pro

imgOfflinednnjungle
141 posts
5th
Joined
3/13/2005

Re: TextBox1 not declared
Posted: 03 May 06 10:03 AM

When you add a control to any page it should declare the counterpart variable on the codebehind file. Seems this is not being done in your case, and I don't know why.

I've seen this problem something when working on the HTML view and then switch to code (.vb) view. Somewhat the variable was not declared on your case neither.

You could try declaring these two variables in the codebehind file.


Disgrafic.com
imgOfflinepirataceleste
2 posts
Joined
5/2/2006

Re: TextBox1 not declared
Posted: 03 May 06 11:18 AM

Yes, in fact, hey are declared automatically.

Here is the code (is it something left out?):

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub

Protected WithEvents CheckBox1 As System.Web.UI.WebControls.CheckBox

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.

Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase
.Init

'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.

InitializeComponent()
End Sub

#End Region

 

I apologize for that I've posted the same question in three forums (asp.net, dnnjungle and dnn), trying to solve this quicly.

 

  DotNetNuke Development  HelloWorld Tutorial  TextBox1 not de...
© Vicenç Masanas Terms Of Use Privacy Statement   
.