This is something that I'm not sure if it's a problem or something I have configured wrong. Just thinking on it is making my head hurt!!
So here goes. What I'm doing...
1. create a blank VS2010 web project called "MySite" targeted at 4.0
2. create a new class object, calling it "class1.vb" (cause it's so unique!!)
3. change default code to read as such...Namespace MySite
Public Class Functions
Public Shared Function WhatIsTodaysDate() As String
4. create a new webform and drop a label control on it.
In the page_load event, I want to set the label to equal the value of Function WhatIsTodaysDate. Simple enough, but now comes the part that escapse me.
I can do this...Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Label1.Text = MySite.Functions.WhatIsTodaysDate()
but if I want to shorten my code, and call the function using an "Imports" tag i have to do this...Imports MySite.MySite.Functions
Public Class WebForm1
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Label1.Text = WhatIsTodaysDate()
Why is VS asking me to call the namespa
View Complete Post