So, I'm attempting to write a little ASP.NET application, even though I'm a terminal newbie about such things, and NOT a programmer by nature. My programming method is basically taking code from various other places and tweaking it to death.
The application grabs some data from an Access database. It also grabs the user's IP address and displays it in a label on the page.
Oddly, I got the database connection working, but I can't get the @#()$*( IP address into the ASP label. In fact, I can't get ANYTHING into the ASP label.
I'm trying, in the page_load sub, to do this:
I just get a blank label. I suspect that I'm missing something obvious, like the fact that I'm not allowed to do this during page_load or something.
Even if I do this, I still get a blank label:
Thoughts?
Thanks!
Steve
The application grabs some data from an Access database. It also grabs the user's IP address and displays it in a label on the page.
Oddly, I got the database connection working, but I can't get the @#()$*( IP address into the ASP label. In fact, I can't get ANYTHING into the ASP label.
I'm trying, in the page_load sub, to do this:
Code:
Sub Page_Load()
Dim ClientIP As String = Request.ServerVariables("REMOTE_ADDR")
Label1.Text = ClientIP
End Sub
I just get a blank label. I suspect that I'm missing something obvious, like the fact that I'm not allowed to do this during page_load or something.
Even if I do this, I still get a blank label:
Code:
Sub Page_Load()
Label1.Text = "Testing"
End Sub
Thoughts?
Thanks!
Steve