473,382 Members | 1,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

C# Web App: Help Needed to Find Alternative Ways to Add Assembly References

AHayes
10
This is actually my first post, so please forgive any forum "no-nos" in this post.


_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
  1. <%@ Import Namespace="System.Data" %>
  2. <%@ Import Namespace="System.Data.SqlClient" %>
  3.  

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
Sep 17 '07 #1
2 1454
Plater
7,872 Expert 4TB
imports are just used to make life easier.
Change everything to make fully qualified references?

So where-ever you use say "SQLCommand" you should say:
"System.Data.SqlClient.SQLCommand"

See if that helps you?
Sep 17 '07 #2
AHayes
10
imports are just used to make life easier.
Change everything to make fully qualified references?

So where-ever you use say "SQLCommand" you should say:
"System.Data.SqlClient.SQLCommand"

See if that helps you?

Thank you for the quick response. I tried it...it seems to work. Well, I say that. I'm still getting a nice generic error--but I'm pretty sure it has nothing to do with the above and it's outside the scope of this site.


You know, unless there's a "why isn't smartpart/sharepoint working?" section of this page that I'm unfamiliar with... :)


Thanks again.
Sep 19 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: abcd | last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a ljetvedehg, hard slog," mariyu vede legai pressed...
8
by: Droopy | last post by:
Hi, I am working for a few month on a C# project (mixed dll for calling C++ legacy code with a C# wrapper). Since this morning, I can't start my application anymore ! I got a...
20
by: Jason Dravet | last post by:
Some time ago I wrote an application that controls the projectors in our classrooms(turn on, turn off, and volume control). This application is written in VB.net 2003. It was working perfectly...
2
by: Rod | last post by:
I've been struggling with this thing for 2 days, and after searching the 'net for help, I cannot find what is wrong. We're using Crystal Reports XI Release 2, with Visual Studio .NET 2003 in...
14
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
8
by: =?Utf-8?B?TWFyaw==?= | last post by:
We've got a wierd failure happening on just one machine. One part of our product uses a 3rd party search implementation (dtSearch). DtSearch has a native core (dten600.dll), late-bound, and a...
2
by: =?Utf-8?B?SmltIE93ZW4=?= | last post by:
Hi John, Hopefully this post will find its way back to you - or perhaps be answered by someone else. As I mentioned in my last post on the earlier portion of this thread, changing the...
9
by: AGP | last post by:
I have a VB6 application that has an OLE container with an embedded Excel chart. Our office updated to Excel 2007 and now although the app works the charts looks like crap. Since the app is fairly...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.