User control that use assembly

O

ogonicle

Hello,

I'm trying to use an usercontrol that use a vb file that is located in the
ASSEMBLY.

My project namespace is "SW.ShortcutWebpart" and his assembly name is
"SW.ShortcutWebpart"

in this project there is only one class shortcut.vb

I succeed to load the user control but he throw me an exception.he said that
he cannot load the assembly SW.ShortcutWebpart!

Page.LoadControl(ControlVPath) Run-time exception thrown :
System.Web.HttpParseException - Could not load file or assembly
'SW.ShortcutWebpart' or one of its dependencies. The system cannot find the
file specified.

<%@ Register TagPrefix="SW" Namespace="SW.ShortcutWebpart"
Assembly="SW.ShortcutWebpart" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="shortcut.vb"
Inherits="SW.ShortcutWebpart.Shortcut"%>

I tried also like this
<%@ Register TagPrefix="SW" Namespace="SW.ShortcutWebpart"
Assembly="SW.ShortcutWebpart, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=407f8864e4908e2f" %>

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="shortcut.vb"
Inherits="SW.ShortcutWebpart.Shortcut"%>

with this, he tell me that
Page.LoadControl(ControlVPath) Run-time exception thrown :
System.Web.HttpParseException - The directive 'page' is unknown.



What can i do to tell to ascx file to take the .vb in the assembly ?

Thank you in advance

ogonicle
 

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

Top