By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,402 Members | 1,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,402 IT Pros & Developers. It's quick & easy.

Simple superclassed control: error

P: n/a

I have a problem with a simple Composite Control I am trying to make.
It's in fact a superclassed control.

My projectname is SortedTextBox. My testapp is TestSortedTextBox.


Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.WebControls

<ToolboxData("<{0}:SortedTextBox runat=server></{0}:SortedTextBox>")>
Public Class SortTextBox
Inherits System.Web.UI.WebControls.TextBox

Public Sub Sort()
Dim arrText As String()
arrText = Me.Text.Split(" ")
Me.Text = String.Join(" ", arrText)
End Sub

End Class

In my TestSortedTextBox I have to following html:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="TestSortedTextBox.WebForm1"%>
<%@ Register TagPrefix="Custom" NameSpace="SortedTextBox"
Assembly="SortedTextBox" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<meta name="GENERATOR" content="Microsoft Visual
Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET
<meta name="vs_defaultClientScript"
<meta name="vs_targetSchema"
<form id="Form1" method="post" runat="server">
<Custom:SortedTextBox id="SrtText"
runat="server" />

When I Build the project, it builds fine. However, when I want to
visualize the control (design view in VS.Net 2003) in
TestSortedTextBox, the control says "Error creating control". When I
run the project, of course I get an error at <Custom:SortedTextBox
id="SrtText" runat="server" /in Internet Explorer.

What do I forget? What do I do wrong?
Sep 23 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.