"Type not defined" message in VWD Express - but still works (sometimes)! http://forums.asp.net/t/1030235.aspx/1?+Type+not+defined+message+in+VWD+Express+but+still+works+sometimes+Wed, 27 Sep 2006 21:32:49 -040010302351412154http://forums.asp.net/p/1030235/1412154.aspx/1?+Type+not+defined+message+in+VWD+Express+but+still+works+sometimes+"Type not defined" message in VWD Express - but still works (sometimes)! <p>Hi<br> <br> I am passing the parameter AimId to a UserControl called ucNodeGrid which I add adding to a placeholder called ListPatternPlaceholder with code like this...<br> </p> <p>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'Add NodeGrid User Control<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim ucNodeGrid As Control<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ucNodeGrid = Page.LoadControl(&quot;~/DesktopModules/Pattern/ListPatternNodeGrid.ascx&quot;)<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' pass AimId to ListPatternNodeGrid.ascx<br> &nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CType(ucNodeGrid, ListPatternNodeGrid).AimId = AimId<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Me.ListPatternPlaceholder.Controls.Add(ucNodeGrid)</p> <p>This works but VWD Express underlines&nbsp; ListPatternNodeGrid in the CType in a blue wavy line and says &quot;Type defined not&quot; ... however this compiles and runs OK</p> <p>&nbsp;Except that I now want to pass two more parameters forward to ucNodeGrid, and this time all three give me ListPatternNodeGrid &quot;Type not defined&quot; and this time it certainly does not compile.</p> <p>So my question is how do I pass several parameters to a User control in a way that VWD will like?</p> <p>Many thanks</p> <p>&nbsp;<br> Geoffrey<br> &nbsp;</p> 2006-09-27T21:32:49-04:00