Variable Declarations
I am doing a very simple page to change the background color of the page based on a checked radio button. I'm using VS.NET, so putting the code-behind. The problem is that when I declare my variable in the HTML page, the code-behind page doesn't recognize the declaration and won't compile, and when I put it in the code-behind page, I get this error when it try to view the page:
BC30390: 'LearningSite.RadioButtonAutoPostBack.strBackGroun dColor' is not accessible in this context because it is 'Private'.
We'll, it is NOT private. I didn't put it into anything that says "Private" Here is what it looks like:
--------------------------------------------------------
Public Class RadioButtonAutoPostBack
Inherits System.Web.UI.Page
Dim strBackGroundColor As String = "white"
Public Sub BackColor_Changed(ByVal s As Object, ByVal e As EventArgs)
strBackGroundColor = s.Text
End Sub
End Class
-----------------------------------------------------------
What now?
|