_The Background
For a work project, I need to port an ASP.Net (C#) search application to a SharePoint webpart. To do this "easily" we're using this SharePoint plugin called Smartpart which basically will allow me to use my pre-existing ASP.Net website code and allows me to load it in SharePoint as a webpart.
_The Problem
Smartpart works fine, but it has a limitation in which I can only use code that would run in the BODY of the ASP.Net/HTML document (i.e. I have no access to header code). This means that my assembly references can't be added in code, as they were before:
Expand|Select|Wrap|Line Numbers
- <%@ Import Namespace="System.Data" %>
- <%@ Import Namespace="System.Data.SqlClient" %>
I need a way to include the above references without having to type them in the document itself.
_What I've Tried
In Visual Studio.Net 2005, I've attempted to add the two references by going to Website>Add Reference... in the menu-bar and selecting "System.Data" and "System.Data.SqlClient". This worked fine for "System.Data.SqlClient", as it created a /bin/ sub-directory and added the reference for me. However, the same can't be said for "System.Data"--simply, nothing happened.
So, again, if anyone knows of alternative ways to add references (or maybe even why Visual Studio.Net would add "System.Data.SqlClient" and ignore "System.Data") I would appreciate some assistance.
Thanks.
-Andy Hayes