Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
In Vb.net we used Module file to declare& define function. we can use this function anywhere in the project.In the Asp.net which is like Module. how can we use that in Project

Please help for this problem.

Thanks in Advance
Posted
Comments
Sergey Alexandrovich Kryukov 14-Dec-11 3:31am    
Wow! This is what I call a real confusion! Time to unlearn what you have learned, start over. Always useful, in fact.
--SA
Al Moje 14-Dec-11 3:31am    
Question not clear. What do you mean by Module file?

i think you need a class in which you can put all your common functions

For that just add a class in your project.

C#
Right click >> Add >> Class


And you can write your functions here.

To access this class

C#
class1 obj = new class1();


obj.FunctionS of that class you can access
 
Share this answer
 
v2
ASP.NET is not another language like VB.NET. ASP.NET projects can be implemented in C#, C++/CLI, F# and even — believe or not — in VB.NET. According to this, a language feature of VB.NET remains the same feature if it is used in a ASP.NET solution (Web site).

—SA
 
Share this answer
 
v2
Comments
devausha 14-Dec-11 3:44am    
OK, In C# which file is same as Module file?
Sergey Alexandrovich Kryukov 14-Dec-11 10:56am    
This is not a file in either. This is a static class.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900