Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Problem creating wrapper

Reply
Thread Tools

Problem creating wrapper

 
 
Stephen
Guest
Posts: n/a
 
      01-07-2005
Hi
I have been asked by our web host to build a wrapper for a third party
component we wish to use on our web application.
The reason behind this was so I could add the two following lines:
[assembly: AssemblyKeyFileAttribute(@"..\..\keyPair.snk")]
[assembly: AllowPartiallyTrustedCallersAttribute()]
and they will then store my wrapper in the GAC and my Application will
access the component using my trusted wrapper.


I have never built a wrapper before and I am getting the following
error when I attempt to view the page with my component/wrapper on it:

Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.

Source Error:
Line 13: <body MS_POSITIONING="GridLayout">
Line 14: <form id="Form1" method="post" runat="server">
Line 15: <cc1:TestButton id="TestButton1" style="Z-INDEX: 101;
LEFT: 200px; POSITION: absolute; TOP: 48px" <-THIS LINE
Line 16: runat="server"></cc1:TestButton></form>
Line 17: </body>

All that i have done is place my component on the form (no code) and
set the licence key in the Global.asax.cs file (code here, but this
part seems to work fine).

The error is probably because I have no idea how to write a wrapper,
so here is the code for my wrapper. (It is a web control library)

using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;

namespace ButtonComponent
{
[DefaultProperty("Text"),
ToolboxData("<{0}:TestButton runat=server></{0}:TestButton>")]
public class TestButton : Xceed.Chart.Server.ChartServerControl
{

static public void SetKey()
{
Xceed.Chart.Server.Licenser.LicenseKey = "xxx";
}
}
}

All that i want the wrapper to do is allow me to access the regular
functions and properties of ChartServerControl component, so I thought
that this would do, obviously I was wrong.
I really have no idea what i am doing, so any help would be greatly
appreciated.
Thank you very much
Stephen
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a wrapper to two identical shared libraries SoofaLoofa C Programming 2 03-14-2008 03:30 PM
creating a wrapper around a vendor api ma740988 C++ 9 10-10-2006 01:13 PM
Creating Python wrapper for DLL Tim Python 4 09-27-2006 06:53 PM
Creating a Wrapper Stephen ASP .Net 4 01-06-2005 10:59 PM
Creating Python class wrapper for a command line tool Edvard Majakari Python 4 05-27-2004 05:42 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57