Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
2.87/5 (4 votes)
See more:
Hi to all

i want to use class library for web application. but it is not coming...what i have to do 4 that..
Posted
Comments
Sergey Alexandrovich Kryukov 9-Nov-11 11:12am    
To general. Everything can use a library. Also, a library is not specific to a type of application; it's just a .NET library.
--SA

Just create a normal class library project in Visual Studio and add it as a reference to your web application project.
 
Share this answer
 
Comments
[no name] 9-Nov-11 10:52am    
How much shall we bet that he will try to stuff webpages into the library?
♥…ЯҠ…♥ 9-Nov-13 1:42am    
I think, he wants both web application and class library project in single solution... see my answer below
jim lahey 9-Nov-11 11:20am    
you never know, it might be a satellite assembly full of embedded style sheet resources because "Class Library" reads as "CSS Library" if you squint hard enough
Sergey Alexandrovich Kryukov 9-Nov-11 11:20am    
That is correct (a 5), but the main problem might be OP's approach to learning, not just asking questions; please see my solution.
--SA
Amir Mahfoozi 9-Nov-11 13:43pm    
+5
Please see my comment to the question.

This question is nearly equivalent to the question "how to do .NET programming?".

No one can answer this question, because this is some education, not just short solution or information. Main idea is this: stop all your attempts to develop any real-life project before you learn all the basics of technologies to be used and all basic techniques. The concept of a class library is too basic to miss. Learn you language by the manual from its first page to the last one and just the basics of .NET before you move to ASP.NET or anything like that. Start from being comfortable with just the console applications.

Only when you are ready, you are qualified to ask questions at CodeProject. You are welcome; and we will gladly help you.

—SA
 
Share this answer
 
Right click on the solution in solution explorer and add a new project to the solution.

In the installed templates, select windows and class library.

Give a name to the class library and click ok.

Add reference to your main project(Which requires the class library), and then you can use the class library in your asp.net we project.
 
Share this answer
 
Hi Sunilmvj,

I Gotta solution for you,
1) Create Web application in Visual studio(You know how to create)
2) Create Class library(File--> New project --> Class library)
2.1) In that wizard Give the class library name
2.2) In solution part, change it to "Add to solution" option
2.3) Now select the location of the project(by default VS will select opened project)
2.4) Now click ok, thats it you have class library/any project with web application in single solution.

I hope this helps you a bit

Regards,
RK
 
Share this answer
 
v2
 
Share this answer
 

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