C
C Gatto
Hello,
In a VS2003 app I have an aspx page (default.aspx) with a PlaceHolder
defined (phMain). In my aspx code-behind I am dynamically creating a
reference to a web user control (CaseDetails.ascx), adding that control to
the placeholder, and then calling the web user control's various functions.
This works great in VS2003. But when the project was converted over to
VS2005 the Intellisense is now complaining that "Type 'CaseDetails' is not
defined" (all references to CaseDetails are underlined in blue). It will
still compile and run - telling me that the compiler has no problem with
this, but the VS2005 ide does seem to have a problem. Has anyone seen a
similar behavior ?
Code looks like:
****************************************
'CaseDetails Web User Control Class Definition
****************************************
Partial Public Class CaseDetails
Inherits System.Web.UI.UserControl
Private _intCaseNum As Integer
Public Property CaseNum() As Integer
Get
Return _intCaseNum
End Get
Set(ByVal value As Integer)
_intCaseNum = value
End Set
End Property
Public Function ftnTest() As Boolean
Return False
End Function
End Class
****************************************
'default.aspx - page_load event
****************************************
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Dim myCaseDetails As CaseDetails
myCaseDetails = CType(Page.LoadControl("CaseDetails.ascx"), CaseDetails)
phMain.Controls.Add(myCaseDetails)
myCaseDetails.ftnSomeFunction()
End Sub
In a VS2003 app I have an aspx page (default.aspx) with a PlaceHolder
defined (phMain). In my aspx code-behind I am dynamically creating a
reference to a web user control (CaseDetails.ascx), adding that control to
the placeholder, and then calling the web user control's various functions.
This works great in VS2003. But when the project was converted over to
VS2005 the Intellisense is now complaining that "Type 'CaseDetails' is not
defined" (all references to CaseDetails are underlined in blue). It will
still compile and run - telling me that the compiler has no problem with
this, but the VS2005 ide does seem to have a problem. Has anyone seen a
similar behavior ?
Code looks like:
****************************************
'CaseDetails Web User Control Class Definition
****************************************
Partial Public Class CaseDetails
Inherits System.Web.UI.UserControl
Private _intCaseNum As Integer
Public Property CaseNum() As Integer
Get
Return _intCaseNum
End Get
Set(ByVal value As Integer)
_intCaseNum = value
End Set
End Property
Public Function ftnTest() As Boolean
Return False
End Function
End Class
****************************************
'default.aspx - page_load event
****************************************
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Dim myCaseDetails As CaseDetails
myCaseDetails = CType(Page.LoadControl("CaseDetails.ascx"), CaseDetails)
phMain.Controls.Add(myCaseDetails)
myCaseDetails.ftnSomeFunction()
End Sub