All the classes are converted to partial
and in the user controls
the shared property has following error.
"Reference to a non-shared member requires an object reference".
All the classes are converted to partial
and in the user controls
the shared property has following error.
"Reference to a non-shared member requires an object reference".
Conversion Issue from VS.NET 2002 to VS.NET 2005
superjoe30
Hi, Vishal
VS 2005 uses partial classes to allow multi-source-file classes. Especially useful when separating the Form developer from the code behind the form. As for the shared properties, at each of these errors you should get an option to replace the object reference with the class name. Shared properties and methods cannot access internal data structures in the class, thus the error.
jhusain
Partial Public
MustInherit Class workingNewHeaderControl2 Inherits System.Web.UI.UserControl Protected WithEvents companyLogo As System.Web.UI.WebControls.ImageProtected WithEvents Image1 As System.Web.UI.WebControls.Image
Protected WithEvents Label2 As System.Web.UI.WebControls.Label Protected WithEvents accountLable As System.Web.UI.WebControls.Label Protected WithEvents TodayDate As System.Web.UI.WebControls.LabelPublic Shared Property Set_Title() As String
Get End Get Set(ByVal Value As String)workingNewHeaderControl2.pageTitle.Text = Value'' it gives error here as mentioned above.
End Set End PropertyWorkingNewheaderControl2 is a Web User Control which has this above mentioned
shared property
pagetitle is not a part of declaration
but pagetitle is declared in HTML.
Can you please tell me what is the work around for this.
Matt Greenwald
Barts007