Son Of SmartPart User Control with references

R

ryan.mclean

Hello all,

I need help. I would like to add a user control to our sharepoint site,
but the user control has to have a reference to web services or
assemblies registered in the gac. No matter what I have tried, I get
type not defined errors. I'm positive others have accomplished this.
Will you share how you did it?

I would prefer the user control use the web services (or services) to
get data. The web part doesn't seem to know the (services) classes. I
am useing vs.net 2005.

I have tried putting the classes into the gac and the vb/dll files into
the UserControl folder for the Son of SmartPart. Not sure what to try
next.

Thank you and have a nice day,
Ryan
 
Joined
Sep 1, 2006
Messages
1
Reaction score
0
Son of SmartPart using Web Services...

I was having the same problem.

I am creating a user control to use within a "Son of SmartPart UC" Web Part. I am accessing the lists web service within my user control. When I accessed it from the SOSP UC web part it blew up at the first sign of the web service (If I took the web service out of the code it rendered fine)

Here is how I got it to work...

1. I took my "App_WebReferences" folder from my site, the same that contains my user control, and copied it to "C:\Inetpub\wwwroot".

2. Then I looked at the web.config from my project and copied the appSettings section and copied it to the web.config in "C:\Inetpub\wwwroot" as well.
My appSettings section looked like this:
==========================================================
<appSettings>
<add key="SharePointLists" value="http://localhost/_vti_bin/Lists.asmx"/>
</appSettings>
==========================================================

That was it. I reloaded the page with the SOSP UC Web Part that has my user control and it worked great!

Remember to step lightly when modifying the web.config file for your SharePoint site.

I hope this helps.

---------------------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
---------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top