.
Session("UserName") = "Sally"
Dim userName As String = Session("UserName")
Do i need to convert the session variable to string if i wanna follow “good coding practices”?
Ex:
Session("UserName") = "Sally"
Dim userName As String = Convert.ToString(Session("UserName"))
Yes as a good practice and if you want to assign to a new variable:
Otherwise you can use it directly:
Note that value
"Sally"(wrapped in quotes) is a string.