473,761 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web Custom Control - Tooltip and Rendering within IDE

I've built a composite web custom control with a lot of
child controls. I assigned ToolTip values to some of
these controls. The ToolTip pop-ups were working fine
until I monkeyed with the order I am rendering the
controls. I had to do this so that the control rendered
properly when a developer drags it from the toolbox onto
the page. Any ideas?

Below is the meat of the code from my user control. The
remainder is private methods.
*************** *************** *************** *******

using System;
using System.Data;
using System.Data.Sql Client;
using System.Web.UI;
using System.Web.UI.W ebControls;
using System.Web.UI.H tmlControls;
using System.Componen tModel;
using Microsoft.Web.U I.WebControls;
using Common.Controls ;

namespace smc.Vehicles
{
/// <summary>
/// Summary description for VehicleSearch.
/// </summary>
[DefaultProperty ("Text"),
ToolboxData("<{ 0}:VehicleSearc h
runat=server></{0}:VehicleSear ch>")]
public class VehicleSearch :
System.Web.UI.W ebControls.WebC ontrol, INamingContaine r
{
SqlConnection _connection;
VehicleSearch.T ypeOfSearch typeSearch =
VehicleSearch.T ypeOfSearch.PIC K;

// child controls
Panel theDiv = new Panel();
Panel thePanel = new Panel();
Image theLogoImage = new Image();

DropDownList ddlbProduct = new
DropDownList();
TextBox tbBodyStart = new TextBox();
TextBox tbBodyEnd = new TextBox();

DropDownList ddlbSeqType = new
DropDownList();
TextBox tbSeqStart = new TextBox();
TextBox tbSeqEnd = new TextBox();

TextBox tbEIM1 = new TextBox();
TextBox tbEIM2 = new TextBox();
TextBox tbEIM3 = new TextBox();
TextBox tbEIM4 = new TextBox();
TextBox tbEIM5 = new TextBox();
TextBox tbEIM6 = new TextBox();
TextBox tbEIM7 = new TextBox();
TextBox tbEIM8 = new TextBox();
TextBox tbEIM9 = new TextBox();
TextBox tbEIM10 = new TextBox();
TextBox tbEIM11 = new TextBox();
TextBox tbEIM12 = new TextBox();
TextBox tbEIM13 = new TextBox();
TextBox tbEIM14 = new TextBox();
TextBox tbEIM15 = new TextBox();
TextBox tbEIM16 = new TextBox();
TextBox tbEIM17 = new TextBox();
TextBox tbEIM18 = new TextBox();

DropDownList ddlbProduct2 = new
DropDownList();

TextBox tbSSDFrom = new TextBox();
TextBox tbSSDTo = new TextBox();
Common.Controls .nnaDateControl dcFrom =
new Common.Controls .nnaDateControl ();
Common.Controls .nnaDateControl dcTo = new
Common.Controls .nnaDateControl ();

[Bindable(false) ,
Category("Data" ),
DefaultValue("" )]
public SqlConnection Connection
{
get
{
return _connection;
}

set
{
_connection = value;
}
}

[Bindable(false) ,
Category("Appea rance"),
DefaultValue("" )]
public VehicleSearch.T ypeOfSearch
SearchType
{
get
{
return typeSearch;
}

set
{
typeSearch = value;
}
}

public enum TypeOfSearch
{
PICK,
BUILDSEQUENCE,
STATUS,
COLOR
}

/// <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)
{
this.RenderChil dren(output);
}

protected override void OnInit
(System.EventAr gs e)
{
InitializeContr ols();
base.OnInit(e);
}

protected override void OnLoad(EventArg s
e)
{
base.OnLoad(e);
registerClientF unctions();
}

public override void DataBind()
{
this.EnsureChil dControls();

if (typeSearch !=
VehicleSearch.T ypeOfSearch.PIC K)
{
thePanel.Visibl e = false;
theLogoImage.To olTip
= "The VEHICLE SEARCH control is in " +typeSearch.ToS tring
()+ " mode." +typeSearchDesc ription();
}
else
{
thePanel.Visibl e = true;
theLogoImage.To olTip
= "The VEHICLE SEARCH control is in PICK mode. You can
choose the desired output type by changing the selection
in the SEARCH TYPE radio buttons.";
}

if (_connection.St ate !=
ConnectionState .Open)
{
_connection.Ope n();
}

fillProduct();
fillSequenceNum berType();

_connection.Clo se();
}
Nov 17 '05 #1
0 1516

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

Similar topics

1
6770
by: E J | last post by:
Does anyone know of a way to wrap custom tags around selected text using execCommand or otherwise? I am developing a rich text editor for use in a web site and while there are a few decent ones already floating around I need to implement a few extra bits of functionality. Specifically tool tips. Idealy I'd like to wrap custom tags around selected text using execCommand. Ie "Selected Text"
15
10948
by: Tinus | last post by:
Hello all, I've created a custom control that draws a monthly schedule (using the Draw function in C#). Basically it draws 31 boxes and writes the day number in every box. This works great. But I now want to show a different tooltip for every day. For now I found out that I can add a tooltip for the entire custom control
2
3199
by: Jay Walker | last post by:
I created a custom DataGridColumn based on Marcie Robillard's MSDN Article: Creating Custom Columns for the ASP.NET Datagrid http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/creatingcustomcolumns.asp The problem I am having is that the data in the custom datagridcolumn is not saved to viewstate and after postback, the column does not contain data.
21
2102
by: One Handed Man \( OHM - Terry Burns \) | last post by:
When using a custom control. In order to check and see if values have changed one has to implement the IPostBackDataCollection interface. The values returned for the control seem to be simply a string with comma delimited values. For example, if I were to render two text boxes. One with the Value Terry and the Other with the Value 'Burns' I would get the following value Terry,Burns.
1
2271
by: Peter | last post by:
I have a dilemna. Currently I have created a custom calendar webcontrol that a user can select and will dump the date along with some specialized information set in the tooltip. It actually is working great. However I am having the same second thoughts about the control as everyone else because of all the real estate it takes up so I would like to add a button to alternately hide/display the calendar control. The only problem is that if I...
0
1125
by: Luis Alonso | last post by:
Hi, I had created a web custom control to ask for user' confirmation on deleting and others process. I put the control in a vb file. The control is really simple: only an image button and a hidden panel to show a wait message.... The control has a PreRender (with a RegsiterClientScriptBlock) event and a Render event (that writes the control) I put the control on a datagrid. The control asks confirmation fine and I'm able to retrieve (in...
2
4924
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is being updated by some other process through remoting. When the page loads, I init the tree, and in my browser I can see the initialized tree. The problem is that every time that I receive update to tree from the remote process,
4
2334
by: Charles Zhang | last post by:
I created a custom server control whose rendering logic relies on session variables and cookies. It works just fine at run time. The problem is at the design time, because session variables and cookies are not available, so that I get error messages. I just wonder if there are any way such as conditional compile options to overcome the problem? Thanks Charles Zhang
11
3287
by: Nick Gilbert | last post by:
Hi, How can I create a custom control which will wrap its content in a header and footer? eg: Is it possible to create a .NET user control which can surround other controls? eg: <my:RoundedCornerBox id=foo runat=server>
0
9522
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...
0
9336
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10111
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9948
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9902
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,...
1
7327
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
5215
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...
1
3866
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.