Reputation: 373
I have created a new Asp web application project called TestWeb. I have also created another class Library application to contain model classes and called this Model. In TestWeb I have added a reference to Model and can see the .dll file inside the bin folder of this project. However when inside my default.aspx folder in TestWeb I cannot access the Model namespace. This is driving me nuts. What is it that Im doing incorrectly.
One thing that I have noticed is that my about page can access the namespace but default.aspx can't
Thanks
Upvotes: 1
Views: 238
Reputation: 15175
I was able to get similar functionality in these steps:
1. Create Solution "MySolution"
2. Add a WebSite or Web Application project to "MySolution" named "MyWeb"
3. Add a Class Library Project To "MySolution" named "MyLibrary"
4. Select "MyWeb" project in the Solution Explorer and select the references node
5. Click Add Reference
6. Select the Solution List View Item on the right hand side
NOTE : You should see "MyLibrary" as a selection
7. Select "MyLibrary"
8. Open "MyWeb" Default.aspx -> cs or vb file.
9. Add using MyLibrary.ClassName
I am able to reference and instantiate and "MyLibrary" classes just fine. If you add code to "MyLibrary" you may have to rebuild it sometimes in order for intellisense to pick up the changes right away.
Upvotes: 1