a simple start but im hving problems

K

kal

Hi

I am trying this simple custom control. from here:
http://samples.gotdotnet.com/quickstart/aspplus/doc/webctrlauthoring.aspx#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>");
}
}
}
}
 
G

Guest

Hi

I am trying this simple custom control. from here:http://samples.gotdotnet.com/quickstart/aspplus/doc/webctrlauthoring....

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
 
G

Guest

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 ...>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top