472,331 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,331 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 1442

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...
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...
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...
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...
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...
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...
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...
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...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...

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.