473,387 Members | 1,485 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,387 software developers and data experts.

a simple start but im hving problems

kal
Hi

I am trying this simple custom control. from here:
http://samples.gotdotnet.com/quickst...x#innercontent

when i browse the page it gives me an error:

Could not load file or assembly SimpleControlSamples or one of its
dependencies. The system cannot find the file specified.

Can anyone help please.

thanks
<%@ Register TagPrefix="SimpleControlSamples"
Namespace="SimpleControlSamples" Assembly="SimpleControlSamplesVB" %>

<html>

<body>

<form method="POST" runat="server">

<SimpleControlSamples:SimpleInnerContentVB id="MyControl"
runat=server>
My Message Is Inside the Control Tag!!!!
</SimpleControlSamples:SimpleInnerContentVB>

</form>

</body>

</html>
using System;
using System.Web;
using System.Web.UI;

namespace SimpleControlSamples {

public class SimpleInnerContent : Control {

protected override void Render(HtmlTextWriter output) {

if ( (HasControls()) && (Controls[0] is LiteralControl) ) {
output.Write("<H2>Your Message: " + ((LiteralControl)
Controls[0]).Text + "</H2>");
}
}
}
}
Jun 5 '07 #1
3 1078
On Jun 5, 1:16 pm, "kal" <a...@noplace.comwrote:
Hi

I am trying this simple custom control. from here:http://samples.gotdotnet.com/quickst...bctrlauthoring....

when i browse the page it gives me an error:

Could not load file or assembly SimpleControlSamples or one of its
dependencies. The system cannot find the file specified.

Can anyone help please.
You copied the code of ASPX VB-version and class in C#

There is no difference except the name of class

Assembly="SimpleControlSamplesVB"
public class SimpleInnerContent

Take a look in the View Source link again on gotdotnet.com and you
will see what was the original code of VB-class

Jun 5 '07 #2
is the assembly is in your bin directory?
Jun 6 '07 #3
Does the assembly SimpleControlSamplesVB exist in the bin folder? Also, I
guess the name of the control class should be SimpleInnerContentVB. Or
<SimpleControlSamples:SimpleInnerContentVB ...should actually be
<SimpleControlSamples:SimpleInnerContent ...>

"kal" wrote:
Hi

I am trying this simple custom control. from here:
http://samples.gotdotnet.com/quickst...x#innercontent

when i browse the page it gives me an error:

Could not load file or assembly SimpleControlSamples or one of its
dependencies. The system cannot find the file specified.

Can anyone help please.

thanks
<%@ Register TagPrefix="SimpleControlSamples"
Namespace="SimpleControlSamples" Assembly="SimpleControlSamplesVB" %>

<html>

<body>

<form method="POST" runat="server">

<SimpleControlSamples:SimpleInnerContentVB id="MyControl"
runat=server>
My Message Is Inside the Control Tag!!!!
</SimpleControlSamples:SimpleInnerContentVB>

</form>

</body>

</html>
using System;
using System.Web;
using System.Web.UI;

namespace SimpleControlSamples {

public class SimpleInnerContent : Control {

protected override void Render(HtmlTextWriter output) {

if ( (HasControls()) && (Controls[0] is LiteralControl) ) {
output.Write("<H2>Your Message: " + ((LiteralControl)
Controls[0]).Text + "</H2>");
}
}
}
}
Jun 6 '07 #4

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

Similar topics

51
by: Alan | last post by:
hi all, I want to define a constant length string, say 4 then in a function at some time, I want to set the string to a constant value, say a below is my code but it fails what is the correct...
9
by: robbie.carlton | last post by:
Hello! I've programmed in c a bit, but nothing very complicated. I've just come back to it after a long sojourn in the lands of functional programming and am completely stumped on a very simple...
5
by: sarge | last post by:
I would like to know how to perform simple multithreading. I had created a simple form to test out if I was multithreading properly, but got buggy results. Sometime the whole thig would lock up...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
10
by: serge calderara | last post by:
Dear all, I need to build a web application which will contains articles (long or short) I was wondering on what is the correct way to retrive those article on web page. In orther words, when...
26
by: jacob navia | last post by:
Summary: I have changed (as proposed by Chuck) the code to use isalpha() instead of (c>='a' && c <= 'z') etc. I agree that EBCDIC exists :-) I eliminated the goto statement, obviously it is...
4
true911m
by: true911m | last post by:
Here's a little walkthrough to get py2exe up and running. I'm not an expert, so I can't help much with any problems you might have. This is what worked for me. The result here will be to convert...
176
by: nw | last post by:
Hi, I previously asked for suggestions on teaching testing in C++. Based on some of the replies I received I decided that best way to proceed would be to teach the students how they might write...
6
kenobewan
by: kenobewan | last post by:
Congratulations! You are one of the few who realise that over 80% of errors are simple and easy to fix. It is important to realise this as it can save a lot of time. Time that could be wasted making...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.