10:07 AM

User Controls in SharePoint

Hello guys! Unlike all my previous post, today we get a bit technical.. I found a way to create a custom searching using User Controls in SharePoint 2007.. Is this what you are looking for?



1. Create .dll file
If it is, to create a custom searching like this, first you need to create a .dll file.. You can download the .dll file here. Then you place the file in your bin folder in your MOSS site. This will create a web part that can be used throughout your SharePoint site by loading UserControl created by you..

2. Create UserControls folder
Then in your MOSS directory (C:\Inetpub\wwwroot\wss\VirtualDirectories\) , create a folder called UserControls.



3. Modify web.config
Next step is, open your web.config and add this code..



4. Change your trust level from WSS_Minimal to Full
Search 4

5. Restart IIS

6. Add in your Web Part
Return to your SharePoint site, go to your Site Actions, click on Web Parts. Then, click New. Find the web parts that you've created and click on Populate Gallery. Your web parts are ready to be used.

7. Find User Controls
In your web part, place your User Control directory..


Congratulations! You now can use your user control in SharePoint.. And this include your searching function.. :)
You can read more here. Thanks Agusto Xaverius! Really save my time..

0 comments: