Hi,
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 TestSortedTextB ox.
SortedTextBox:
Imports System.Componen tModel
Imports System.Web.UI
Imports System.Web.UI.W ebControls
<ToolboxData("< {0}:SortedTextB ox runat=server></{0}:SortedTextB ox>")>
_
Public Class SortTextBox
Inherits System.Web.UI.W ebControls.Text Box
Public Sub Sort()
Dim arrText As String()
arrText = Me.Text.Split(" ")
Array.Sort(arrT ext)
Me.Text = String.Join(" ", arrText)
End Sub
End Class
In my TestSortedTextB ox I have to following html:
<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="Web Form1.aspx.vb" Inherits="TestS ortedTextBox.We bForm1"%>
<%@ Register TagPrefix="Cust om" NameSpace="Sort edTextBox"
Assembly="Sorte dTextBox" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta name="GENERATOR " content="Micros oft Visual
Studio .NET 7.1">
<meta name="CODE_LANG UAGE" content="Visual Basic .NET
7.1">
<meta name="vs_defaul tClientScript"
content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<Custom:SortedT extBox id="SrtText"
runat="server" />
</form>
</body>
</HTML>
When I Build the project, it builds fine. However, when I want to
visualize the control (design view in VS.Net 2003) in
TestSortedTextB ox, the control says "Error creating control". When I
run the project, of course I get an error at <Custom:SortedT extBox
id="SrtText" runat="server" /in Internet Explorer.
What do I forget? What do I do wrong?
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 TestSortedTextB ox.
SortedTextBox:
Imports System.Componen tModel
Imports System.Web.UI
Imports System.Web.UI.W ebControls
<ToolboxData("< {0}:SortedTextB ox runat=server></{0}:SortedTextB ox>")>
_
Public Class SortTextBox
Inherits System.Web.UI.W ebControls.Text Box
Public Sub Sort()
Dim arrText As String()
arrText = Me.Text.Split(" ")
Array.Sort(arrT ext)
Me.Text = String.Join(" ", arrText)
End Sub
End Class
In my TestSortedTextB ox I have to following html:
<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="Web Form1.aspx.vb" Inherits="TestS ortedTextBox.We bForm1"%>
<%@ Register TagPrefix="Cust om" NameSpace="Sort edTextBox"
Assembly="Sorte dTextBox" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta name="GENERATOR " content="Micros oft Visual
Studio .NET 7.1">
<meta name="CODE_LANG UAGE" content="Visual Basic .NET
7.1">
<meta name="vs_defaul tClientScript"
content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<Custom:SortedT extBox id="SrtText"
runat="server" />
</form>
</body>
</HTML>
When I Build the project, it builds fine. However, when I want to
visualize the control (design view in VS.Net 2003) in
TestSortedTextB ox, the control says "Error creating control". When I
run the project, of course I get an error at <Custom:SortedT extBox
id="SrtText" runat="server" /in Internet Explorer.
What do I forget? What do I do wrong?