473,763 Members | 5,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.W ebControls;
using System.Componen tModel;

namespace TransComp.eTowe r.Controls
{
/// <summary>
/// Custom Phone textbox that will mask to (###)###-####.
/// </summary>
[DefaultProperty ("Text"), ToolboxData("<{ 0}:PhoneTextBox
runat=server></{0}:PhoneTextBo x>")]
public class PhoneTextBox : System.Web.UI.W ebControls.Text Box
{
/// <summary>
/// Render this control to the output parameter specified.
/// </summary>
/// <param name="output"Th e HTML writer to write out to </param>
protected override void Render(HtmlText Writer output)
{

output.Write(Te xt);
}
}
}

I register the control in my aspx page with this directive:
<%@ Register TagPrefix="eTow er" Namespace="Tran sComp.eTower.Co ntrols"
Assembly="eTowe r" %>
and then use this to call it:
<eTower:PhoneTe xtBox id="cPhone" runat="server" Width="280px" Font-
Names="Tahoma" Font-Size="8pt"></eTower:PhoneTex tBox>

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 1195

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

Similar topics

19
2987
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 provide an open TD with a DIV in it for the content of this formlet. (The DIV is for DHTML to hide and show the content) I've created a web page showing step by step the two problems I'm encountering. This problem is much easier to see than it...
1
3390
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 comprised of a DataGrid may have separate permissions for adding, deleting and updating a news item. Problem Up until now, I have been implementing security directly inside the control. I will test directly against the security model to see if...
3
1561
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 "inaccessible due to its protection level" error) because the NodePopulate event of the treeview is set to private. So I changed it to "protected" and the app compiles fine and runs and properly reacts to the event. Good. The problem is inside that...
6
3520
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 1.1 Configuration. I have also put a reference to the control on my ASP .NET project. The view that I get is only a disabled text area. Below is the code that I'm using:
14
14657
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 so I get the ObjectDataSource. No problem ..... ObjectDataSource src = .... //is ok i have it
1
4811
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 Toolbox in Visual Web Developer 2005 Express Edition but the alert message isn't popping up when I am implementing this control in an ASP.NET page & clicking the Button in the ASPX page. This is the class file: Imports System Imports System.Web...
15
6521
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 accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then i added this line "" before my custom control class (i dont know what this line does). Now
2
2663
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 like to be able to trace/debug my custom control, when it is on my other project windows form application.
2
2700
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 is primarily a windows panel with three controls added ( textbox, combo box, and picturebox). In looking at the code for the custom control I see no issue with it. Any pointers on how to determine which likely control in this custom control...
5
4127
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 to wrap the control in the proper control type - which is also a container. At design time I want to be able to turn this : <my:container> <asp:textbox />
0
9563
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9938
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3523
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.