I am completely new to sharepoint. I am attempting to create a very basic webpart for a trial. When I write code in C# it works fine however when I write it in VB.net it does not show in the list to be imported. I have made several C# parts and imported them without and issue. I am installing the DLL to the GAC, adding the trusted assembly tag to the web.config file and all the C# parts show up to be imported but the VB.NET never shows on the list. Other than the code language I am using the exact same methods to get them into Sharepoint. Thanks in advance for any help.
C# Code:
using
System;using
System.Collections.Generic;using
System.Web;using
System.Text;
namespace
CSWebPart{
public class CSWebPart
{
protected override void Render(System.Web.UI.HtmlTextWriter writer){
writer.Write(
"This is a webpart using C#"); base.Render(writer);}
}
}
VB.NET Code:
Imports
SystemImports
System.Collections.GenericImports
System.TextImports
System.WebNamespace
VBWebPart Public Class VBWebPart Inherits System.Web.UI.WebControls.WebParts.WebPart Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)writer.Write(
"This is a webpart made using Visual Basic") MyBase.Render(writer) End Sub End ClassEnd
Namespace