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

Custom control in ASP.NET 1.1.432 issue

I am trying to create a custom textbox that has an input mask to show
the text as a phone number. I am very new to this language and trying
to figure out how these pages relate. I thought I had this set up but
the control appears in an odd manner. It is supposed to just be an
inherited textbox control but instead in the design window it shows up
as black text like this [ myCustomControl ] in bold. It does not
appear at all on the page and is completely neglected from the HTML.

here is my codebehind page:

using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;

namespace TransComp.eTower.Controls
{
/// <summary>
/// Custom Phone textbox that will mask to (###)###-####.
/// </summary>
[DefaultProperty("Text"), ToolboxData("<{0}:PhoneTextBox
runat=server></{0}:PhoneTextBox>")]
public class PhoneTextBox : System.Web.UI.WebControls.TextBox
{
/// <summary>
/// Render this control to the output parameter specified.
/// </summary>
/// <param name="output"The HTML writer to write out to </param>
protected override void Render(HtmlTextWriter output)
{

output.Write(Text);
}
}
}

I register the control in my aspx page with this directive:
<%@ Register TagPrefix="eTower" Namespace="TransComp.eTower.Controls"
Assembly="eTower" %>
and then use this to call it:
<eTower:PhoneTextBox id="cPhone" runat="server" Width="280px" Font-
Names="Tahoma" Font-Size="8pt"></eTower:PhoneTextBox>

Can anyone see what I am doing wrong? I have been working on it now
for some time and I'm running out of ideas. Maybe this is not
supported in 1.1.432 and only in 2.0? Thanks in advance.

Mar 13 '07 #1
0 1178

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

Similar topics

19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
1
by: Earl Teigrob | last post by:
Background: When I create a ASP.NET control (User or custom), it often requires security to be set for certain functionality with the control. For example, a news release user control that is...
3
by: Eric Sabine | last post by:
I've created a custom control (ascx) which contains a tree view, a drop down list, and a listbox. The custom control is included in a web form and at runtime, won't compile (I get the...
6
by: Budhi Saputra Prasetya | last post by:
Hi All, I'm trying to display .NET Custom Control (created using Inherited Control) on an ASPX page, but no luck. I already registered the Control to Global Assembly Cache through .NET Framework...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
1
by: rn5a | last post by:
I have created a custom control button which when clicked displays a message in the JavaScript alert dialog. I could successfully compile the VB class file into a DLL & also could add it to the...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
2
by: --== Alain ==-- | last post by:
Hi, I have some issue to debug my custom control. For example, in my solution i have 2 projects. 1 project is my custom control and the other one, is a windows form application. I would...
2
by: =?Utf-8?B?RXJpYw==?= | last post by:
Hello All, I am currently working on an issue that has a custom control that mimics a combobox that when it has focus it continues to generate endless WM_PAINT Messages. The control in itself...
5
by: gerry | last post by:
I am trying to create a custom container control that will only ever contain a specific type of control. At design time, when a control of a different type is added to the container I would like...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.