Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > user control in an assembly

Reply
Thread Tools

user control in an assembly

 
 
Steve Richter
Guest
Posts: n/a
 
      04-22-2005
I have moved a code behind user control from my asp.net web application
project into a separate assembly.

Where I had registered the control this way:
<%@ Register TagPrefix="ac" TagName="ArticleSummary"
Src="ArticleSummary.ascx" %>

Now I register it like so:
<%@ Register TagPrefix="ac" Namespace="AutoCoder.Controls"
Assembly="AutoCoder" %>

When I moved the control into the assembly class library project, I
moved both the .ascx and .ascx.cx files.

The problem is, now the control does not work! Everybody compiles ok,
but when I run it I get an "object reference not set to an instance"
error.

That error occurs when a link button on the control trys to register
its click event.

Can the .ascx, .ascx.cs combo be used in an assembly based user
control? How do the references to the controls in the .ascx file get
set or whatever in the code behind class instance in the .ascx.cs file?

( if this is too vague I can post the code. It will be neat to get the
answer to this question! )

thanks,

-Steve

 
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
adding assembly to windows\assembly through bat file Grant Merwitz ASP .Net 3 09-15-2005 11:40 AM
Assembly's manifest definition does not match the assembly reference. Horatiu Margavan via .NET 247 ASP .Net 0 08-30-2004 04:14 PM
ASP.NET 2.0: What is the namespace and assembly name of generated assembly SA ASP .Net 0 08-09-2004 05:09 PM
Referencing assembly from GAC using @assembly fails Brent ASP .Net 1 01-23-2004 08:23 PM
can a strongly named assembly reference a regular assembly? Prasanna Padmanabhan ASP .Net 1 11-19-2003 06:21 AM



Advertisments