D
David P. Donahue
When I wrote websites in VB .NET, I would often put functions in Global
for all the pages to call. Now, in C#, doing so results in "references
to non-static objects" and whatnot. I realize what that means and all,
but what I'm wondering is what's the best way around it? Say, for
example, I want a function that takes a username and a password and
returns true or false if it's a successful login, and I want any page or
usercontrol in the website to be able to call that function, where
should I put it and what syntax do I need?
Regards,
David P. Donahue
(e-mail address removed)
for all the pages to call. Now, in C#, doing so results in "references
to non-static objects" and whatnot. I realize what that means and all,
but what I'm wondering is what's the best way around it? Say, for
example, I want a function that takes a username and a password and
returns true or false if it's a successful login, and I want any page or
usercontrol in the website to be able to call that function, where
should I put it and what syntax do I need?
Regards,
David P. Donahue
(e-mail address removed)