Last post Feb 28, 2007 04:05 AM by Gerard
Feb 19, 2007 08:45 AM|Gerard|LINK
I have a problem adding a webpart to MOSS2007.
I used a
tutorial to create a webpart, but it is not showing up in my webpart gallery. Where do i check what has gone wrong?
Feb 19, 2007 10:07 AM|craigw7272|LINK
A couple questions;
1. The class you created for your webpart, what class did it inherit from?
2. Did you make your class public??? many people miss this and SP won't load the class.
Feb 20, 2007 03:49 PM|Gerard|LINK
Here's the code:
public class WebPartToExplore : System.Web.UI.WebControls.WebParts.WebPart
protected override void Render(System.Web.UI.HtmlTextWriter writer)
Feb 20, 2007 04:10 PM|craigw7272|LINK
Did you generate a key and sign your assembly then add an entry in the share point web.config for it? and either install it into the GAC or the SP /bin of the site you're adding it to?
Feb 21, 2007 03:15 AM|Gerard|LINK
Feb 21, 2007 05:54 AM|Gerard|LINK
Feb 25, 2007 08:41 PM|craigw7272|LINK
Please paste the line you added to your web.config file -
Feb 26, 2007 05:30 AM|Gerard|LINK
Feb 26, 2007 07:18 AM|Steve@Planet|LINK
I have been playing around with this for a bit now, trying to force the web part not to appear.
The 3 things I found I did that would replicate your issue were:
Feb 28, 2007 04:05 AM|Gerard|LINK
Wooohooooo, i got it to work[:D]
I changed the PublicKeyToken and compiled in release mode.
Thank you guys for your help!