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>");
}
}
}
}
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>");
}
}
}
}