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

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.SqlClient;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.ComponentModel;
using Microsoft.Web.UI.WebControls;
using Common.Controls;

namespace smc.Vehicles
{
/// <summary>
/// Summary description for VehicleSearch.
/// </summary>
[DefaultProperty("Text"),
ToolboxData("<{0}:VehicleSearch
runat=server></{0}:VehicleSearch>")]
public class VehicleSearch :
System.Web.UI.WebControls.WebControl, INamingContainer
{
SqlConnection _connection;
VehicleSearch.TypeOfSearch typeSearch =
VehicleSearch.TypeOfSearch.PICK;

// 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("Appearance"),
DefaultValue("")]
public VehicleSearch.TypeOfSearch
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.RenderChildren(output);
}

protected override void OnInit
(System.EventArgs e)
{
InitializeControls();
base.OnInit(e);
}

protected override void OnLoad(EventArgs
e)
{
base.OnLoad(e);
registerClientFunctions();
}

public override void DataBind()
{
this.EnsureChildControls();

if (typeSearch !=
VehicleSearch.TypeOfSearch.PICK)
{
thePanel.Visible = false;
theLogoImage.ToolTip
= "The VEHICLE SEARCH control is in " +typeSearch.ToString
()+ " mode." +typeSearchDescription();
}
else
{
thePanel.Visible = true;
theLogoImage.ToolTip
= "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.State !=
ConnectionState.Open)
{
_connection.Open();
}

fillProduct();
fillSequenceNumberType();

_connection.Close();
}
Nov 17 '05 #1
0 1487

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

Similar topics

1
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...
15
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...
2
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...
21
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...
1
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...
0
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...
2
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...
4
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...
11
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:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.