I need to import some global functions into each page on my asp.net 4 VB website.
Is global.asax a suitable place to write these functions?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Nops
Create you class file in App_code folder and in that create function that will be available to all you pages in application.
If you want to access the function directly without creating class object that create static function in your class file that will do the work for you.
or
Create class library and create class/function in it and that make use of that library in your project that will also allow you to access that class library function in all your page class files.