I have a class where I am setting values fro inclusion on other pages,
Private Shared m_ucToDisplayForApplicant As String
Public Shared Property ucToDisplayForApplicant() As String
Get
Return m_ucToDisplayForApplicant
End Get
Set(value As String)
Dim s As String = value
m_ucToDisplayForApplicant = value
End Set
End Property
Public Shared Function ucType()
Dim ucTypeToShow As String = HttpContext.Current.Session.Item("SelectedVar")
Select Case ucTypeToShow
Case "1"
ucTypeToShow = "ucType1"
Case "2"
ucTypeToShow = "ucType2"
Case "3"
ucTypeToShow = "ucType3"
Case Else
End Select
Return ucTypeToShow
End Function
I am trying to use this function to set the value on my pages but the value is always returned null
Have you tried the VS debugger to see if the else clause is called? If it not expected to be called you could also thrown an exception to show you run into an unexpected case.
If not familiar with the debugger see https://msdn.microsoft.com/en-us/library/mt243867.aspx
Member
15 Points
100 Posts
Class file referencing a function to return a variable
Jun 27, 2016 02:04 PM|sanjshah|LINK
Hi,
I have a class where I am setting values fro inclusion on other pages,
I am trying to use this function to set the value on my pages but the value is always returned null
Any help is appreciated.
Regards
All-Star
43250 Points
14991 Posts
Re: Class file referencing a function to return a variable
Jun 27, 2016 02:39 PM|PatriceSc|LINK
Hi,
Have you tried the VS debugger to see if the else clause is called? If it not expected to be called you could also thrown an exception to show you run into an unexpected case.
If not familiar with the debugger see https://msdn.microsoft.com/en-us/library/mt243867.aspx