GuitarMike
Programmer
I've successfully made some web parts in visual studio and deployed them with a cab file and I've used the strongly named assemblies. Now I need to display my web part (the hello world web part at this point) outside of a web part zone. I want to add the web part as a control on the default.aspx page. When I do this, I get an error: 'External component has thrown an exception.'
The code of my web part is as follows:
output.Write(SPEncode.HtmlEncode("Hello World!"));
The webpart works when i drag and drop it onto a page. When I use the following snippet in my default.aspx however, I get the error.
at top:
<%@ Register Tagprefix="INGBC" Assembly="BreadCrumbs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=48c44aa74f9e952b" Namespace="BreadCrumbs" %>
in the page:
<INGBC:BreadCrumbsPart runat="server" id="BreadCrumbsPart" />
I believe I have the namespace/assembly names etc. correct because if I change them, I get other errors like the assembly cannot be found. So, I'm not sure what's wrong at this point. Any help here would be great.
Thanks in advance!
Mike
The code of my web part is as follows:
output.Write(SPEncode.HtmlEncode("Hello World!"));
The webpart works when i drag and drop it onto a page. When I use the following snippet in my default.aspx however, I get the error.
at top:
<%@ Register Tagprefix="INGBC" Assembly="BreadCrumbs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=48c44aa74f9e952b" Namespace="BreadCrumbs" %>
in the page:
<INGBC:BreadCrumbsPart runat="server" id="BreadCrumbsPart" />
I believe I have the namespace/assembly names etc. correct because if I change them, I get other errors like the assembly cannot be found. So, I'm not sure what's wrong at this point. Any help here would be great.
Thanks in advance!
Mike