The given assembly name or codebase was invalid.
I'm trying to use a compiled custom server control.
I followed instructions found on MSDN:
1. add a reference to the dll into bin folder
2. put the @register directive in a web form
3. put the <uc:webgrid ... > directive into the web form to call the control
Here is the code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="prova.aspx.cs" Inherits="prova" %>
<%@ Register TagPrefix="uc" Namespace="Inva.WebControls2" Assembly="bin/InvaWebControls2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<uc:webgrid id="wg1" runat="server"></uc:webgrid>
</div>
</form>
</body>
</html>
I got the error listed inthe title at IDE time and I cannto get rid of it despite many trials.
The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
I also tried to recompile the source and use the fresh generated dll without success.
Please give me a hint!
Thanks a lot.
Lucio Fassio
|