CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 11/18/2003 7:50:51 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 16 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
BoulderBum
Asp.Net User
Compiles, Properties Manipulatable in Editor, Runtime Compilation Error11/18/2003 7:50:51 AM

0/0

I developed my first Web Custom Control, but I'm getting a frustration error at runtime. The control itself compiles fine. I added it to my controls in the IDE, it drags and drops fine, its properties are visible in the Properties window, etc. Everything seems fine, but when I start a debugging session, I get this error:


Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0234: The type or namespace name 'CompositeControl' does not exist in the class or namespace 'CompositeControl.CompositeControl' (are you missing an assembly reference?)

Source Error:



Line 79:
Line 80: private System.Web.UI.Control __BuildControlcomCntrl() {
Line 81: CompositeControl.CompositeControl __ctrl;
Line 82:
Line 83: #line 14 "http://localhost/CompositeControlTest/WebForm1.aspx"


Source File: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\compositecontroltest\bd24d331\53d60527\bl5lmgnt.0.cs Line: 81


Here's my control's code:


using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;

namespace CompositeControl
{
/// <summary>
/// Summary description for CompositeControl.
/// </summary>
public class CompositeControl : Control, INamingContainer
{
public CompositeControl()
{
ViewState["MinValue"] = 0;
ViewState["MaxValue"] = 1000;
}

protected override void CreateChildControls()
{
Label lbl = new Label();
Button btn = new Button();

lbl.Height = Unit.Pixel(25);
lbl.Width = Unit.Pixel(75);
lbl.Text = "0";

btn.Height = Unit.Pixel(25);
btn.Width = Unit.Pixel(75);
btn.Text = "Go";

Controls.Add(lbl);
Controls.Add(btn);

btn.Click += new EventHandler(btnClick);
}

[Category("Behavior"), Description("Minimum value")]
public int MinValue
{
get
{
return Convert.ToInt32( ViewState["MinValue"] );
}
set
{
ViewState["MinValue"] = value;
}
}

[Category("Behavior"), Description("Maximum value")]
public int MaxValue
{
get
{
return Convert.ToInt32( ViewState["MaxValue"] );
}
set
{
ViewState["MaxValue"] = value;
}
}

public void btnClick( Object sender, System.EventArgs e )
{
System.Random r = new System.Random();
int intValue;

intValue = r.Next( Convert.ToInt32( ViewState["MinValue"]), Convert.ToInt32( ViewState["MaxValue"]) );

Label lbl = (Label) Controls[0];

this.EnsureChildControls();
lbl.Text = intValue.ToString();
}
}
}


What could be going wrong?
Andy Smith
Asp.Net User
Re: Compiles, Properties Manipulatable in Editor, Runtime Compilation Error11/18/2003 7:02:15 PM

0/0

I've seen weirdness when the namespace ends with the same word as the control name. Try changing one of them.
BoulderBum
Asp.Net User
Re: Compiles, Properties Manipulatable in Editor, Runtime Compilation Error11/19/2003 12:19:08 AM

0/0

That did it. Can't have the same namespace/class name apparently. I wonder why it compiles if it's doomed to crash.

Thank you.
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
BLISS: A Language for Systems Programming are a manipulatable item in the language (a prerequisite ..... control of a compile time toggle, cause a user-defined. function to be called on each entry ...
Advanced Concepts Otherwise, you will get an error when you compile, generate, ...... also select the REF name itself to become a manipulatable item within your application. ...
Tensegrity Software your development environment to be able to compile and run the tutorial examples . ..... GraphView is a manipulatable, persistable object in its own right. ...
Delphi Super Page /* home location is Delphi.ICM.edu.pl ( Poland ... You are able to change the object properties at Runtime. odge.zip 128284 25-04- 1998 ...... I cannot state if the code will compile on Delphi 1 or Delphi 2. ...
Do We Need an "IDE 2.0" Revolution? Sep 19, 2007 ... I'm not worried about security, because Lisper have this problem everytime they call LOAD, COMPILE, or EVAL. They've always had this problem ...
The healing process…. | I Hate Lotus Notes This useful editor will, upon attempting to save or even change focus, attempt to “compile” (???) your non-compilable javascript (? ...
You asked a question to the channel Im giving you my frank opinion ... the compile hosting has special support for foreaching arrays .... be declared final and the contents of the collection still be manipulatable at runtime? ...
What do you believe about Programming Languages (that you can't ... Basically, you'd like to reify a lot of things about the runtime ...... Compile- time metaprogramming gives you a better way to avoid ...
c Copyright by Mark Christopher Astley, 1999 Moreover, component distribution may be a run-time rather than compile-time. property; application components (e.g. Java applets) may need to adapt to ...
National Center for Geographic Information and Analysis Selected ... resulting associations and indices are metadata manipulatable by a ..... causes of error which may affect spatial data viz. data collection and compilation, ...




Search This Site:










help importing the users from 2.0.4 to 2.1.2

skin specific pane containers

mhtml module 01.00.00

viewstate error

dupe a portal

saving and running asp.net project from a new location

is ie web controls just for ie?

asp.net 1.1 on win xp pro

validation question

are these controls?

slideshow module

configuration error - access is denied: 'microsoft.web.ui.webcontrols'

module setting or database table entry

map quest errors - dnn 2.0.3 final release

deployment problems to production system

word application in asp.net

validators with ok/cancel?

error with treeview control while converting from asp.net 1.1 to asp.net 2.0

the 'nullvalue' attribute for xs:attribute is not supported in this context

find string

usercontrol naming convention - please help!

a n'udder bug? sitemap/menu not displaying link to external site

mail from smtpclient goes to junk folder !!!

public variables and sharing them between pages

user login from ms access.. is it possible?

win2003 web edition & dotnetnuke204

how to organize tags in the head when using masterpage and theme

web application folder name

user interfaces

pls help (urgent)... i'm really frustrated with the dynamic custom sitemap provider...

 
All Times Are GMT