473,385 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Shared User Control - with Codebehind

Hi there!

I'm following this article
(http://www.codeproject.com/aspnet/ctrlreuse.asp -> "Share your user control
across multiple web applications".
It explains how to share user control with codebehind.

So, I have 2 projects: The first is my UserControl's project and the other
the Consumer's project.
I have put the assembly in GAC but I'm still getting this error at the
consumer: Could not load type 'SharedUserControl.CabecalhoPadrao'

In short, my consumer's project can achieve the usercontrol (in deeper
virtual directory) but that says can't "see" the class (CabecalhoPadrao)...

Any Ideas?

thanks so mutch
Marcos
Nov 18 '05 #1
3 1532
did you set a reference?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Marcos MOS" <ma***********@softway.com.br> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
Hi there!

I'm following this article
(http://www.codeproject.com/aspnet/ctrlreuse.asp -> "Share your user control across multiple web applications".
It explains how to share user control with codebehind.

So, I have 2 projects: The first is my UserControl's project and the other
the Consumer's project.
I have put the assembly in GAC but I'm still getting this error at the
consumer: Could not load type 'SharedUserControl.CabecalhoPadrao'

In short, my consumer's project can achieve the usercontrol (in deeper
virtual directory) but that says can't "see" the class (CabecalhoPadrao)...
Any Ideas?

thanks so mutch
Marcos

Nov 18 '05 #2
Yes, I did.

If I cut out the Codebehind and Inherits tags and put the block code in aspx
file ... That error disappear...

thanks
Marcos
"Curt_C [MVP]" <software_AT_darkfalz.com> escreveu na mensagem
news:ur**************@tk2msftngp13.phx.gbl...
did you set a reference?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Marcos MOS" <ma***********@softway.com.br> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
Hi there!

I'm following this article
(http://www.codeproject.com/aspnet/ctrlreuse.asp -> "Share your user

control
across multiple web applications".
It explains how to share user control with codebehind.

So, I have 2 projects: The first is my UserControl's project and the other the Consumer's project.
I have put the assembly in GAC but I'm still getting this error at the
consumer: Could not load type 'SharedUserControl.CabecalhoPadrao'

In short, my consumer's project can achieve the usercontrol (in deeper
virtual directory) but that says can't "see" the class

(CabecalhoPadrao)...

Any Ideas?

thanks so mutch
Marcos


Nov 18 '05 #3
Hi!

Now It is working ok!
But I have to put that line <add assembly="WebProjectShared,
Version=1.0.1.2, Culture=neutral, PublicKeyToken=e76881568d417308"/>
into the machine.config, ok?
But Could you teach me How version issue works? I mean, if I rebuild my
assembly with the same version the Consumer project doen't see the changes,
right? Is there any way?

thanks
Marcos
"Marcos MOS" <ma***********@softway.com.br> escreveu na mensagem
news:ua**************@TK2MSFTNGP10.phx.gbl...
Hi there!

I'm following this article
(http://www.codeproject.com/aspnet/ctrlreuse.asp -> "Share your user control across multiple web applications".
It explains how to share user control with codebehind.

So, I have 2 projects: The first is my UserControl's project and the other
the Consumer's project.
I have put the assembly in GAC but I'm still getting this error at the
consumer: Could not load type 'SharedUserControl.CabecalhoPadrao'

In short, my consumer's project can achieve the usercontrol (in deeper
virtual directory) but that says can't "see" the class (CabecalhoPadrao)...
Any Ideas?

thanks so mutch
Marcos

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Alphonse Giambrone | last post by:
I have a web form with 2 user controls on it (UC1 and UC2). Each control has a bound datagrid with textboxes in the footer to add a new row. There are also requiredfieldvalidators in each footer....
0
by: Colin | last post by:
Hi there, I really need your help on this. I'm trying to learn to using the VS.2003 to create a User Control. In my aspx code has no problem to use the property "grossWaye" that has "register" in...
6
by: trinitypete | last post by:
I have a user control that is basically a login dialogue. If I add the user control to webpage1, can I access the properties directly from C# codebehind, or do I have to access the properties from...
6
by: Nehal Shah | last post by:
I've read that in the Page Directive of an aspx page, changing the CodeBehind attribute to Src saves you from having to compile the page before refreshing. This is preferable in a large...
13
by: Lloyd Sheen | last post by:
I have now spent 5 hours on google/msdn looking for something useful in the creation of user controls for asp.net. The VS 2003 has very limited support for things such as absolute positioning of...
3
by: Marcos MOS | last post by:
Hi there! I'm following this article (http://www.codeproject.com/aspnet/ctrlreuse.asp -> "Share your user control across multiple web applications". It explains how to share user control with...
11
by: tshad | last post by:
I am setting up some of my functions in a class called MyFunctions. I am not clear as to the best time to set a function as Shared and when not to. For example, I have the following bit...
3
by: Mr Newbie | last post by:
I am messing around with Web User Controls at present and (think) I have discovered the following. 1.) The identifier for the control in the code behind must match the ID for the control on the...
27
by: Javier Martinez | last post by:
Hi I have asp application in a machine with a virtual directory referring a shared directory in another machine When I try to load any aspx page of my portal I get the following error: ...
4
by: archana | last post by:
Hi all, i am having one user control. what i want is to add javascript which will gets called on button click of user control. but user control is not working if i add javascript in user...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.