Getting Started

PowerWEB LiveControls for ASP.NET is a powerful suite of controls designed to enable web applications that can update their data from the server without refreshing the browser. This topic, and related subtopics, address issues such as licensing, distribution, and support for PowerWEB LiveControls for ASP.NET. For tutorials and walkthroughs pertaining to usage of PowerWEB LiveControls for ASP.NET, see either Using PowerWEB Within VS.NET. For a programmer's reference of the classes used by the PowerWEB LiveControls for ASP.NET, see the Reference topic.

In This Section

Documentation Map
Provides a good navigational aid to quickly find the topic you want.
Requirements
Discusses the components that are licensed in PowerWEB LiveControls for ASP.NET.
Licensed Components
Discusses the requirements needed to use PowerWEB LiveControls for ASP.NET.
License Installation
Provides step-by-step instructions on installing a license.
Trial Operation
Provides an overview on using PowerWEB LiveControls in ASP.NET in trial mode.
Deployment
Discusses the steps that are required to distribute an application in ASP.NET.
Support
Provides an overview of the support options that are available for this product.

Related Sections

Using PowerWEB in VS.NET
Provides step-by-step instructions for creating a project using VS.NET, integrating PowerWEB LiveControls for ASP.NET, and creating a simple application.
Using PowerWEB with Notepad
Provides step-by-step instructions for creating a simple project using notepad only.
Optimizing Performance
Discusses techniques for optimizing performance of the the PowerWEB LiveControls for ASP.NET, including reducing ViewState and render-size.
Advanced Topics
Discusses advanced implementations of the PowerWEB LiveControls for ASP.NET.
Reference
Provides a language/syntax and client-side API reference for PowerWEB LiveControls for ASP.NET.
Samples
Describes the samples that are installed with PowerWEB LiveControls for ASP.NET.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Documentation Map

The following topics were designed to get you quickly developing using PowerWEB LiveControls for ASP.NET

To | See
Learn how to obtain and install a license. | License Installation
Learn how to deploy a web application. | Deployment
Learn how to create a web project in VS.NET. | Creating A New Project in VS.NET
Learn how to add LiveControls to a web form in VS.NET. | Adding LiveControls to a WebForm in VS.NET
Learn how to write a simple app using VS.NET. | Walkthrough: Building a Sample Application with LiveControls
Learn how to use the LiveTimer control. | Walkthrough: Updating Real-Time Data Using LiveTimer
Learn how to use the LiveDataGrid control. | Walkthrough: Using the LiveDataGrid Control
Learn how to manipulate non-LiveControls in a callback. | Walkthrough: Manipulating Intrinsic Microsoft Controls in a Callback
Learn how to add a control using Notepad. | Adding a LiveControl to a WebForm Using Notepad
Learn how to build a simple application using Notepad. | Walkthrough: Creating a Simple LiveControl Application in Notepad
Learn how to manage Viewstate. | Viewstate Management
Learn when to use blocking vs. non-blocking techniques. | Blocking vs. Non-blocking
Learn how to use the LiveCallback control. | Creating Custom Callbacks With LiveCallback
Learn how to optimize performace. | Optimizing Performance
Get syntax descriptions for properties, methods, and events of PowerWEB LiveControls for .ASPNET components. | Reference Overview
Get descriptions of samples installed with PowerWEB LiveControls for ASP.NET. | Samples Overview

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Requirements

In order to use PowerWEB LiveControls for ASP.NET you must have the following:

  • .NET Framework
  • Microsoft Visual Studio .NET (recommended)
  • Internet Information Server (IIS) (Recommended)

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Licensed Components

The following controls are licensed:

  • LiveButton
  • LiveCallback
  • LiveCheckBox
  • LiveCheckBoxList
  • LiveDataGrid
  • LiveDropDownList
  • LiveHyperLink
  • LiveImage
  • LiveImageButton
  • LiveLabel
  • LiveLinkButton
  • LiveListBox
  • LiveMessageBox
  • LivePanel
  • LivePlaceHolder
  • LiveRadioButton
  • LiveRadioButtonList
  • LiveSound
  • LiveTextBox
  • LiveTimer

In order to deploy web applications which use the control listed above a license must be purchased from Dart Communications or an authorized reseller. Please see License Installation for more information. A licenses.licx file must also be included with each project in order for the application to compile. Typically, this will automatically be created by Visual Studio .NET when dragging a control onto the WebForm. The only exception to this is when the control is being used in an ASPX page while outside of Visual Studio .NET. This is a Microsoft technical requirement for compilation and the use of 3rd party controls. In these situations, a licenses.licx file must be explicitly created and added to the project. See Creating the Licenses.licx File for more information. Also, a Dart.PowerWEB.LiveControls.lic file must also be present. See License Installation for more information.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


License Installation

This topic covers:

  • Trial Installation
  • Installing a Fully Licensed PowerWEB Product
  • Adding Servers to your License
  • License Details
  • Troubleshooting Licensing

Trial Installation

Installing a PowerWEB product as a fully–functional trial involves running the setup program (available from www.dart.com) without completing the Registration process. The trial will operate for 60 days after installation. Proceed to step 2 of Installing a Fully Licensed PowerWEB Product when you are ready to license the product.

See Trial Operation for more information.

Installing a fully licensed PowerWEB product

Once you have downloaded the latest version, complete the following steps to register your PowerWEB product:

  1. From the Start menu, select Programs, select PowerWEB, select the PowerWEB product you downloaded, and then click License Manager. You should see the screen below:

  2. To being the registration process, click Next to move to the screen below.

  3. Enter your personal information, and then click Next.
  4. The next screen, shown below, will allow you to specify the product you wish to register, add Serial Numbers and Web server NetBIOS names that are to be covered under the license. To add a license, click the Add button in the New Licenses.

  5. When Add is clicked a window will appear, enter the serial number given to you during purchase and click OK.

  6. You should now see the license added to the “New Licenses” window as demonstrated below. You will also be informed how many more servers can be installed under the current license in the “New Web Server NetBIOS Names” window. Click Add in the “New Web Server NetBIOS Names” window to add a Web server name.

  7. Enter the name of the Web server that you wish to license, as shown below. If you have multiple servers, use Add as many times as your license allows. When server names are added, you will see them appear in the “New Web Server NetBIOS Names” window, as demonstrated below.

  8. Click Next for the confirmation screen, as shown below. Make sure the server names are correct; as once they are registered you will have to contact Dart to correct a mistake.

  9. The License Manager will now contact Dart to register the server names with the license. Upon completion you should see the screen below. If you are not able to access the Internet from your location, please call Dart at 315-339-8040 and we can register your servers manually.

A license file will be created in the installation directory of Dart.PowerWEB.LiveControls.dll named Dart.PowerWEB.LiveControls.lic. Please note that the Dart.PowerWEB.LiveControls.lic file must be distributed with the Dart.PowerWEB.LiveControls.dll as that file identifies the licensed Web servers. Other developers in your organization must have the file present in order to develop without being in trial mode. You can use the License Manager to export license files or just manually copy the file from your installation directory.

Adding servers to your license

At some point you may wish to purchase a Serial Number for more servers. The License Manager application can be easily used to add Web servers and generate a new Dart.PowerWEB.LiveControls.lic file that will replace your previous file. After receiving your new Serial Number from Dart:

  1. From the Start menu, select Programs, select PowerWEB, select the PowerWEB product you downloaded, and then click License Manager . You should see the screen below.

  2. The information screen should be pre-filled with all the previously entered information. If you are on a different machine than what was used to register the product, you can import your Dart.PowerWEB.LiveControls.lic on the next screen. Click Next to continue.

  3. The screen will show your current licenses and the servers registered for your licenses. Click Next to continue to the screen below.

  4. Under “Registered License(s)” you will see all the current Serial Numbers that have been registered and to the right you will see all the Web server names that have been registered for the Serial Numbers. To add another Serial Number, click Add in the “New Licenses” window to see the screen below.

  5. Enter the new Serial Number into the provided input area and click OK. You should now see the new server license added to the “New Licenses” window and the option to add the number of servers purchased in the “New Web Server NetBIOS Names” window (in the example below a 3 server license was purchased in addition to a previous single server license). You can now have a total of 4 Web servers licensed for deployment.

  6. You can now add two more Web servers using the Add button in the “New Web Server NetBIOS Names” window. The new servers will be visible in the “New Web Server NetBIOS Names” window.

  7. Click Next to verify the revised status of your licenses as demonstrated below.

  8. Click Next to register your new servers and license. Once the Registration Complete message is displayed you will have a new Dart.PowerWEB.LiveControls.lic file placed in the installation directory of the Dart.PowerWEB.LiveControls.dll file. The next time you use the License Manager, your license and server information will be updated, as shown below. You export the new license if you need to distribute it to other developers or deployment servers.

License Details

After purchasing a serial number from Dart or an authorized reseller, that serial number must be registered using the License Manager application or directly by telephone (315-339-8040) before the Web application can be deployed. The trial is valid for 60 days.

When you are ready to register, please have names of the Web servers that will be hosting your Web application. The serial number you purchased should contain a license for the required number of Web servers. You do not have to register all the servers at once. For example, if you purchased a serial number for 5 Web servers, but only have one at the moment, you can register one now and return later to register the other Web server names.

When registering a serial number for a PowerWEB for ASP.NET product, a license file, such as Dart.PowerWEB.LiveControls.lic, is created on your system (or sent to you if you do not have Internet access for the License Manager application). This file is automatically placed in the installation directory of the Web control. The Dart.PowerWEB.LiveControls.lic file contains the NetBIOS server names specified during registration. If at a later time you add more Web server names, a new Dart.PowerWEB.LiveControls.lic file will be generated to replace the old one. Once you receive this file, it should also be distributed to any other developers working with the PowerWEB for ASP.NET product.

When you compile your Web application, the information from the Dart.PowerWEB.LiveControls.lic file is automatically compiled into the Web application enabling you to XCOPY the application to a target Web server. Please note that if your application requires compilation on-the-fly, you will need to also include the Dart.PowerWEB.LiveControls.lic file along with application files. If you deployed your application as a trial, you can also use the Dart.PowerWEB.LiveControls.lic file to automatically license it by including it in the same location as your deployed application.

If you require any changes to your license, such as changing a Web server name after registration, please contact Dart at 315-339-8040 or email sales@dart.com with your questions. Our license is designed to provide maximum flexibility so please contact us with any comments or requirements that are not listed in this document.

Troubleshooting Licensing

For help troubleshooting licensing issues, see www.dart.com/support/lictrouble.asp.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Trial Operation

If you install a PowerWEB product without registering a Serial Number, it operates as a fully–functional trial for up to 60 days. If you need more time to evaluate the product, contact the Sales Department at sales@dart.com. During installation a trial Dart.PowerWEB.LiveControls.lic file is created and must accompany Dart.PowerWEB.LiveControls.dll for any test deployments, otherwise a LicenseException will be triggered.

Trial Notification in Development Mode

Trial notification will occur when the component is dragged onto a WebForm or on project load once an hour. When the trial expires a LicenseException occurs and prevents the control from being used.

Trial Notification During Run-Time

If the URL is localhost or 127.0.0.1, no trial notification will appear when the component is being used. Any other URL will trigger a trial notification message to the client. When the trial expires a LicenseException occurs and prevents the control from being compiled.

See License Installation for more information on product registration.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Deployment In ASP.NET

Deploying a Web application that uses the PowerWEB LiveControls for ASP.NET is very easy. Just copy the dlland Javascript files along with the Dart.PowerWEB.LiveControls.lic to the target server. The server NetBios name must be one that was registered with Dart. You can use the License Manager to view all the registered servers.

Please note that the control expects to find the Javascript files in the virtual directory specified in the code. When the PowerWEB for ASP.NET product was installed on the development machine, the virtual directory was automatically created. When deploying to a server, you will have to make sure that the directory is present and that the files are copied to the correct location. If you are using a hosting service, they will often not allow you to create virtual directories. In this case, create absolute directories and make sure that the component code reflects these changes.

To deploy your project follow these steps

  1. Add a bin subdirectory to your project directory (if you are using Visual Studio .NET or WebMatrix, this will most likely already be there). For example, if the project is called LiveTest, you should have a directory structure with LiveTest\bin.
  2. Copy the Dart.PowerWEB.LiveControls.dll file and the Dart.PowerWEB.LiveControls.lic file to the \bin directory.
  3. You should now have the LiveText directory with your ASPX file (in this example we will call it default.aspx) and a subdirectory with the two Dart files.
  4. XCOPY or FTP your project to the target server.
  5. Create your virtual directory that points to your project directory.
  6. If you have previously set up a PowerWEB project on that server and you already have a directoy for scripts everything is finished. If not, please continue.

    7. Note:
    The LiveControls control will look for scripts in the default virtual directory of \PowerWEB_LiveControls_Common\Scripts. The control contains properties that let you specify your own file locations, if a different directory is required. For this example, we will use the default settings.

  7. When you installed the PowerWEB LiveControls for ASP.NET product, the files required for the virtual directory were placed in C:\Program Files\PowerWEB\LiveControls for ASP.NET\Common. You can just FTP or XCOPY the directory to the target web server.
  8. Once on the target server, you will need to create a virtual directory called PowerWEB_LiveControls_Common that points to the directory where you placed the \Common directory.
  9. Now access the we site using IE at http://yourservername/LiveTest.

Common Errors

The most common error when deploying a web application using PowerWEB LiveControls for ASP.NET is neglecting to copy the ".lic" file to the deployment server. Whenever you deploy to a server (even if you are just testing in trial mode) you ALWAYS have to include the ".lic" file in the same directory as the dll if you plan on compiling on-the-fly.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Support Options

Our mission at Dart is to deliver high quality controls for Web developers. Our goal is to supplement these solutions with timely support resources that can help at many different levels.

Related Links (you have an active connection to the Internet to view these links).

Paid Support Options
Discusses the paid support options available covering everything from single incidences, to extensive subscriptions.
Free Support Options
Provides access to free materials to help your development, including FAQS, online help files, tutorials, code snippets, online asp samples, and a free support forum.
Support Forum
Provides access to our support forum, monitored by our own development staff as time permits.
Beyond Support
Discusses the custom development support offered by Dart Solutions.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Using PowerWEB Within VS.NET

PowerWEB LiveControls for ASP.NET is a powerful suite of controls designed to enable web applications that can update their data from the server without refreshing the browser. This topic and associated subtopics are mostly prerequisite to the usage of PowerWEB LiveControls for ASP.NET. For example, this topic illustrates such things as basic usage within Visual Studio.NET. If you are already familiar with these tasks, you may benefit more by examining other topics.

In This Section

Creating a new project
Describes how to create a new project in VS.NET.
Adding a LiveControl to a WebForm
Describes how to add the LiveControl to a WebForm.
Walkthrough: Building a simple application with LiveControls
Demonstrates how to create a simple application using LiveControls.
Walkthrough: Updating real-time data using LiveTimer
Demonstrates how to use the LiveTimer to poll the server at specified intervals.
Walkthrough: Using the LiveDataGrid control
Demonstrates how to use the LiveDataGrid control to display information.
Walkthrough: Manipulating intrinsic Microsoft controls in a callback
Demonstrates how to manipulate Microsoft or 3rd party controls during a callback.
Deploying Your Project
Discusses how to deploy your finished project.

Related Sections

Getting Started
Provides an overview of PowerWEB LiveControls for ASP.NET and discusses such topics as distribution, licensing, and support.
Using PowerWEB with Notepad
Provides step-by-step instructions for creating a simple project using notepad only.
Optimizing Performance
Discusses techniques for optimizing performance of the the PowerWEB LiveControls for ASP.NET, including reducing ViewState and render-size.
Advanced Topics
Discusses advanced implementations of the PowerWEB LiveControls for ASP.NET.
Reference
Provides a language/syntax and client-side API reference for PowerWEB LiveControls for ASP.NET.
Samples
Describes the samples that are installed with PowerWEB LiveControls for ASP.NET.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Creating A New Project in VS.NET

The following steps provide a walkthrough to create a project in Visual Studio.NET. Although PowerWEB LiveControls for ASP.NET can be used in your preferred environment on any machine that has the .NET Framework installed, the recommended method is to use the Visual Studio .NET environment.

To create a project in Visual Studio .NET, use the following steps:

  1. Start Visual Studio .NET.
  2. From the File menu, choose New, and then choose Project.
  3. From the resulting dialog box, choose either Visual C# Projects or Visual Basic Projects and then choose ASP.NET Web Application. Specify a name and a location for the project, and then click OK.

  4. After these steps have been completed, the project is created. In this scenario the project files will be in the Inetpub directory which is most often found as C:\Inetpub\wwwroot\WebApplication1.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Adding a LiveControl to a WebForm in VS.NET

Although PowerWEB LiveControls for ASP.NET can be used in your preferred environment on any machine that has the .NET Framework installed, the recommended method is to use the Visual Studio .NET environment.

NOTE If you copy and paste a LiveControl from one form to another in the designer, be sure to add the <%@ Register %> directive to your page.

To add LiveControls to a WebForm within Visual Studio .NET, use the following steps (the following steps demonstrate using the LiveButton and LiveLabel controls ):

  1. Create a project as described in Creating A Project.
  2. Add the a LiveLabel and LiveButton control to the form. To do this, right-click on the ToolBox and choose Customize ToolBox If the ToolBox is not visible, navigate to the View menu and choose ToolBox

  3. From the resulting dialog box, choose the .NET Framework Components tab, and then scroll until you find the LiveButton and LiveLabel controls (see the screen shot below). Check the checkbox next to it and select OK.

  4. Click the LiveButton control icon on the ToolBox, and "drag" an instance of it onto the design surface that represents a WebForm. Do the same with LiveLabel. The Visual Studio .NET environment will automatically create and instantiate an instance of the controls.
  5. Make a quick application to test. Just navigate to the Debug menu and choose Start The app will compile and execute. You should see Internet Explorer (or your other browser) launch with the LiveButton control. The LiveLabel will not be visible until it has text.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Walkthrough: Building a Simple Application with LiveControls

  1. Follow the steps outlined in Adding LiveControls to a WebForm in VS.NET so that a LiveButton and a LiveLabel are visible on the Designer as represented below.

  2. To add code using Code Behind double click the LiveButton to bring up the class representing the WebForm, then enter your code into the LiveButton1_Click event.

    3. [Visual Basic, C#] The following code demonstrates setting LiveLabel1 to show the current time on the server when a button click occurs.

    [C#]
LiveLabel1.Text = System.DateTime.Now.ToString();
[Visual Basic]
LiveLabel1.Text = System.DateTime.Now.ToString()
  3. Compile and run the Web application. You should now have a Web page in Internet Explorer that contains an image of a button. When pressing the button, the current system time should appear as shown below. You will notice that the screen did not refresh when the time appeared. Every time the button is clicked the current time will be displayed.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Walkthrough: Updating Real-time Data Using LiveTimer

One of the most useful purposes of LiveControls is to create an application which constantly updates the browser with updated information. Good examples of this would be real-time sports scores, real-time stocks, current weather, current news, or any other constantly updated data. The technique for creating an application like these is to use LiveTimer and periodically poll the data for new changes.

To use LiveTimer to create a "data-streaming" application, use the following steps: (these steps demonstrate the simple operation of showing the current system time.

  1. Follow the steps outlined in Adding LiveControls to a WebForm in VS.NET to add a LiveLabel and a LiveTimer to the WebForm.
  2. To add code using Code Behind double click the WebForm to bring up the Page_Load event. Add the following code to configure and start the LiveTimer.

    3. [Visual Basic, C#] The following code demonstrates configuring and starting the LiveTimer.

    [C#]
// Set the LiveTimer to fire every 500 milliseconds.
LiveTimer1.Interval = 500;

// Start the LiveTimer
LiveTimer1.Start();
[Visual Basic]
' Set the LiveTimer to fire every 500 milliseconds.
LiveTimer1.Interval = 500

' Start the LiveTimer
LiveTimer1.Start()
  3. Now implement the Tick event. First, "wire-up" the event as appropriate for your environment. Within this event, add the following code to update the LiveLabel with the current time.

    4. [Visual Basic, C#] The following code demonstrates implementing the Tick event.

    [C#]
private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
   LiveLabel1.Text = System.DateTime.Now.ToLongTimeString();
}
[Visual Basic]
Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
   LiveLabel1.Text = System.DateTime.Now.ToLongTimeString()
End Sub
  4. Compile and run the Web application. You should see the time constantly and smoothly updating.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Walkthrough: Using the LiveDataGrid Control

The LiveDataGrid is designed as a remote-scripted replacement for the standard DataGrid. All of the functions supported by the standard DataGrid (such as selecting, editing, deleting, paging, and sorting) are supported by the LiveDataGrid too, except the standard postback is replaced with the "live" callback, enabling all of these functions to occur without any UI disruption, or browser "flash".

  1. Follow the steps outlined in Adding LiveControls to a WebForm in VS.NET so that a LiveGrid is added to the form.
  2. Add some columns to the LiveDataGrid. The LiveDataGrid control supports several additional column types on top of the standard ASP.NET columns:
    • LiveBoundColumn - Displays tabular data.
    • LiveButtonColumn - Selects a row using a Button or a LinkButton
    • LiveEditCommandColumn - Edits a row
    • LiveRadioButtonColumn - Selects a row using a RadioButton
    • LiveCheckBoxColumn - Displays boolean data.

    (Note! For the purposes of this demo, the well-known Northwind database will be used. The LiveDataGrid will display data from the Products table.) The easiest way to add columns is to use the LiveColumnEditor. To do this, access the Design view in VS.NET. Under the Property Window, click the LiveColumnEditor link to open the editor. Once the editor is opened, select "LiveBoundColumn" in the Available Columns list. Click the right arrow button to add it to the Selected Column list. In the DataField textbox, add the database field name of the database to display. For the purposes of this tutorial, this will be the "ProductID" field. In the SortExpression field, type "ProductID" again. This field will be used for sorting data which is addressed later in the walkthrough. Now repeat the process for the "ProductName", "QuantityPerUnit", and "UnitsInStock" fields.

  3. Add some button columns to the LiveDataGrid. Using the same editor, add a "LiveSelect", "LiveEdit,Update,Cancel", and "LiveDelete" column from under the "LiveButton" node. Now the column adding process is complete.
  4. Now use the Properties Window to set default properties for the LiveDataGrid. The properties of interest are the following:
    • AllowPaging = "true"
    • AllowSorting = "true"
    • SelectedItemType = (choose your favorite style configuration)
  5. Now "wire-up" the LiveDataGrid events that will be used. In C# this is easiest done by double clicking the event name in the Properties Window in design view. In VB.NET this is easiest done by selecting the proper events from the drop downs at the top of the code view. The events to wire up are:
    • CancelCommand event
    • DeleteCommand event
    • EditCommand event
    • PageIndexChanged event
    • SortCommand event
    • UpdateCommand event
  6. Now to prepare the datasource for the grid. For the sake of simplicity, copy the Northwind.mdb database from the PowerWEB Samples installation folder to the same folder as your WebForm. Be sure that the database is not read-only and the ASPNET process has proper access rights to the databas.
  7. Now all of the general setup work is done, it is time to write the code required to perform the database tasks. There are several coding tasks that need to be done:
    • Prepare data connection.
    • Display data.
    • Handle "edit".
    • Handle "cancel".
    • Handle "update".
    • Handle "delete".
    • Handle "sort".
    • Handle "page".
  8. First, import the System.Data.OleDb namespace (required to connect to and use Access db files).

    9. [Visual Basic, C#]

    [C#]
using System.Data.OleDb;
[Visual Basic]
Imports System.Data.OleDb
  9. In the first load of the Page_Load event, prepare the connection and bind the data to the LiveDataGrid using a SELECT command. For the purposes of this tutorial, a DoBind function is added to perform the binding. This function can be reused by other events.

    10. [Visual Basic, C#]

    [C#]
private void Page_Load(object sender, System.EventArgs e)
{
   if(!Page.IsPostBack)
      DoBind("", "");
}

private void DoBind(string sortField, string sortDirection)
{
   string connectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("") + "\\Northwind.mdb";
   OleDbConnection connection = new OleDbConnection(connectionString);
   string sql = "SELECT * FROM Products";
   if(sortField != "")
      sql+= " ORDER BY " + sortField;
   if(sortField != "" && sortDirection != "")
      sql+= " " + sortDirection;
   OleDbDataAdapter adapter = new OleDbDataAdapter(sql, connection);

   DataSet dataSet = new DataSet("DataSetProducts");
   adapter.Fill(dataSet, "Products");

   DataView view = dataSet.Tables["Products"].DefaultView;
   LiveDataGrid1.DataSource = view;
   LiveDataGrid1.DataBind();
}
[Visual Basic]
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
   If Not IsPostBack Then
      DoBind("", "")
   End If
End Sub

Private Sub DoBind(ByVal SortField as String, ByVal SortDirection as String)
   Dim connectionString as String = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("") + "\Northwind.mdb"
   Dim connection as new OleDbConnection(connectionString)
   Dim sql as String = "SELECT * FROM Products"
   if(SortField != "")
      sql+= " ORDER BY " + SortField;
   if(SortField != "" && SortDirection != "")
      sql+= " " + SortDirection;
   Dim adapter as new OleDbDataAdapter(sql, connection)
   Dim dataSet as new DataSet("DataSetProducts")
   adapter.Fill(dataSet, "Products")
   LiveDataGrid1.DataSource = dataSet.Tables("Products").DefaultView
   LiveDataGrid1.DataBind()
End Sub
  10. When the user clicks the "edit" link on the "LiveEdit,Update,Cancel" column added earlier, that will raise the EditCommand event. The only task that needs to be performed here is to set the EditItemIndex to make the selected row editable for the user. That should look like the following:

    11. [Visual Basic, C#]

    [C#]
private void LiveDataGrid1_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
   LiveDataGrid1.EditItemIndex = e.Item.ItemIndex;
}
[Visual Basic]
Private Sub LiveDataGrid1_EditCommand(ByVal sender As System.Object, ByVal e As DataGridCommandEventArgs) Handles LiveDataGrid1.EditCommand
   LiveDataGrid1.EditItemIndex = e.Item.ItemIndex
End Sub
  11. Once the EditItemIndex is clicked, this will change all of the fields for the selected row to TextBox controls, allowing those fields to be edited. The "Edit" link will change to an "Update" and "Cancel" link, enabling the user to either save their changes, or cancel editing. The events associated with these actions are the UpdateCommand and CancelCommand events. Write the code required to handle these events. The CancelCommand event is rather simple. The EditItemIndex simply needs to be reset to -1, changing the selected row's fields back from editable TextBox controls to non-editable table cells. The UpdateCommand event requires a bit of database code to update the fields. For this, a DoCommand function is added which can also be reused for the Sort command.
    12. [C#]
private void DoCommand(string cmdText)
{
   string connectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("") + "\\Northwind.mdb";
   OleDbConnection connection = new OleDbConnection(connectionString);
   connection.Open();
   OleDbCommand command = new OleDbCommand(cmdText, connection);
   command.ExecuteNonQuery();
   connection.Close();
}

private void LiveDataGrid1_CancelCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
   LiveDataGrid1.EditItemIndex = -1;
}

private void LiveDataGrid1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
   // Get the new values from the controls
   string key = e.Item.Cells[0].Text;
   string prodName = ((LiveTextBox)e.Item.Cells[1].Controls[0]).Text;
   string quantity = ((LiveTextBox)e.Item.Cells[2].Controls[0]).Text;
   string units = ((LiveTextBox)e.Item.Cells[3].Controls[0]).Text;

   // Run the query
   DoCommand("UPDATE Products Set ProductName = '" + prodName + "', QuantityPerUnit = '" + quantity + "', UnitsInStock = '" + units + "' WHERE ProductID = " + key);

   // Reset the EditItemIndex
   LiveDataGrid1.EditItemIndex = -1;

   // Rebind the grid to display the new values
   DoBind("", "");
}
[Visual Basic]
Private Sub DoCommand(ByVal CmdText as String)
   Dim connectionString as String = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("") + "\Northwind.mdb"
   Dim connection as new OleDbConnection(connectionString)
   connection.Open()
   Dim command as New OleDbCommand(CmdText, connection)
   command.ExecuteNonQuery()
   connection.Close()
End Sub

Private Sub LiveDataGrid1_CancelCommand(ByVal sender As System.Object, ByVal e As DataGridCommandEventArgs) Handles LiveDataGrid1.CancelCommand
   LiveDataGrid1.EditItemIndex = -1
End Sub

Private Sub LiveDataGrid1_UpdateCommand(ByVal sender As System.Object, ByVal e As DataGridCommandEventArgs) Handles LiveDataGrid1.UpdateCommand
   ' Get the new values from the controls
   Dim key as String = e.Item.Cells(0).Text
   Dim prodName as String = e.Item.Cells(1).Controls(0).Text
   Dim quantity as String = e.Item.Cells(2).Controls(0).Text;
   Dim units as String = e.Item.Cells(3).Controls(0).Text;

   ' Run the query
   DoCommand("UPDATE Products Set ProductName = '" + prodName + "', QuantityPerUnit = '" + quantity + "', UnitsInStock = '" + units + "' WHERE ProductID = " + key)

   ' Reset the EditItemIndex
   LiveDataGrid1.EditItemIndex = -1

   ' Rebind the grid to display the new values
   DoBind("", "")
End Sub
  12. Recall earlier that the LiveDataGrid was set up to implement the sort and page events. Now the code has to be written to handle these events. The PageIndexChanged event is the more simple of the two. For this event, the CurrentPageIndex needs to be updated and the data needs to be re-bound.

    13. [Visual Basic, C#]

    [C#]
private void LiveDataGrid1_PageIndexChangedCommand(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
   LiveDataGrid1.CurrentPageIndex = e.NewPageIndex;
   DoBind("", "");
}
[Visual Basic]
Private Sub LiveDataGrid1_PageIndexChangedCommand(ByVal sender As System.Object, ByVal e As DataGridPageChangedEventArgs) Handles LiveDataGrid1.PageIndexChangedCommand
   LiveDataGrid1.CurrentPageIndex = e.NewPageIndex
   DoBind("", "")
End Sub
  13. Now for the SortCommand event. For this event, the data needs to be re-bound using the SortExpression that was specified when the columns were prepared earlier in the tutorial. Also, recall that the DoBind function also allows a direction to be specified ("asc" or "desc", depending on which way the data is to be sorted). For the purposes of this tutorial, "asc" will be hard-coded.

    14. [Visual Basic, C#]

    [C#]
private void LiveDataGrid1_SortCommand(object source, System.Web.UI.WebControls.DataGridSortCommandEventArgs e)
{
   DoBind(e.SortExpression, "asc");
}
[Visual Basic]
Private Sub LiveDataGrid1_SortCommand(ByVal sender As System.Object, ByVal e As DataGridSortCommandEventArgs) Handles LiveDataGrid1.SortCommand
   DoBind(e.SortExpression, "asc")
End Sub
  14. Compile and run the Web application. You should now see a datagrid containing data from the Northwind database. Try some of the functions that were implemented, such as selecting rows, changing data, sorting, and paging.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Walkthrough: Manipulating Non-LiveControls in a Callback

One of the highlights of PowerWEB LiveControls for ASP.NET is the ability of a LiveControl to not only manipulate another LiveControl during a server callback, but also other non-LiveControls. Please note that this is not always guaranteed to work with all 3rd party controls. Manipulating non-LiveControls is done in the exactly like a LiveControl. When a LiveControl triggers an event, a the properties for a non-LiveControl can be set in that event. Below is the same example demonstrated in Walkthrough: Building a simple application with LiveControls but replaces the LiveLabel control with a standard Microsoft Label control (We recommend the use of LiveControls whenever possible as they provide extended events and are designed for supporting UI features such as blocking during a callback).
  1. Follow the steps outlined in Adding LiveControls to a WebForm in VS.NET so that a LiveButton and a Label are visible on the Designer as represented below.

  2. To add code using Code Behind double click the LiveButton to bring up the class representing the WebForm, then enter your code into the LiveButton1_Click event.

    3. [Visual Basic, C#] The following code demonstrates setting Label1 to show the current time on the server when a button click occurs.

    [C#]
Label1.Text = System.DateTime.Now.ToString();
[Visual Basic]
Label1.Text = System.DateTime.Now.ToString()
  3. Compile and run the Web application. You should now have a Web page in Internet Explorer that contains an image of a button. When pressing the button, the current system time should appear as shown below. You will notice that the screen did not refresh when the time appeared. Every time the button is clicked the current time will be displayed.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Deploying Your Project

For information on how to deploy your finished project to the production server, see Deployment In ASP.NET.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Using PowerWEB With Notepad

This topic and associated subtopics are mostly prerequisite to the usage of PowerWEB LiveControls for ASP.NET in notepad. If you are already familiar with these tasks, you may benefit more by examining other topics.

In This Section

Adding a LiveControl to a WebForm
Describes how to add a LiveControl to a WebForm.
Walkthrough: Creating a simple LiveControl application
Demonstrates how to create a simple LiveControl application using notepad.
Deploying Your Project
Discusses how to deploy your finished project.

Related Sections

Getting Started
Provides an overview of PowerWEB LiveControls for ASP.NET and discusses such topics as distribution, licensing, and support.
Using PowerWEB in VS.NET
Provides step-by-step instructions for creating a project using VS.NET, integrating PowerWEB LiveControls for ASP.NET, and creating a simple application.
Optimizing Performance
Discusses techniques for optimizing performance of the the PowerWEB LiveControls for ASP.NET, including reducing ViewState and render-size.
Advanced Topics
Discusses advanced implementations of the PowerWEB LiveControls for ASP.NET.
Reference
Provides a language/syntax and client-side API reference for PowerWEB LiveControls for ASP.NET.
Samples
Describes the samples that are installed with PowerWEB LiveControls for ASP.NET.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Adding LiveControls to a WebForm Using Notepad

To add a LiveControl to a WebForm using notepad, use the following steps:

  1. Be sure PowerWEB LiveControls for ASP.NET has been properly installed.
  2. Create a new file in notepad.
  3. Add the proper @Register directive to the top of the new file, for example:
    <%@ Register TagPrefix="cc1" Namespace="Dart.PowerWEB.LiveControls" Assembly="Dart.PowerWEB.LiveControls" %>
  4. Be sure you have added form runat="server" tags to the HTML body. These tags are required for the HtmlBox.
    5. <form runat="server" ID="Form1">
</form>
  5. Create the specific LiveControls server tags within the form tags. This will create the LiveControls on the page.
    6. 	<cc1:LiveLabel id="LiveLabel1" runat="server"></cc1:LiveLabel>
        <cc1:livebutton id="LiveButton1" runat="server"></cc1:livebutton>
  6. When complete, your entire file should look like the following.
    7. <%@ Register TagPrefix="cc1" Namespace="Dart.PowerWEB.LiveControls" Assembly="Dart.PowerWEB.LiveControls" %>
    <html>
       <body>
        <form runat="server" ID="Form1">
            <cc1:LiveLabel id="LiveLabel1" runat="server"></cc1:LiveLabel>
            <cc1:livebutton id="LiveButton1" runat="server"></cc1:livebutton>
        </form>
     </body>
    </html>
  7. Save the file.
  8. In the same directory as the file, create a directory called bin and copy the Dart.PowerWEB.LiveControls.dll file to that bin directory (ex: c:\LiveControlsTest\bin\Dart.PowerWEB.LiveControls.dll).
  9. Using IIS Administrator, create a virtual directory pointing to the directory where you just saved the file.
  10. Open the file in a browser, it should compile automatically and run, displaying the LiveControls.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Walkthrough: Creating a Simple LiveControls Application Using Notepad

  1. Follow the steps outlines in Adding a LiveControl to a WebForm.
  2. Add the the event and text attributes to the LiveButton tag.
    <cc1:livebutton id="LiveButton1" onclick="LiveButton1_Click" runat="server" Text="Time" ></cc1:livebutton>
  3. Add the following code to handle the LiveButton button click.
    <script runat="server">
        Sub LiveButton1_Click(sender As Object, e As EventArgs)
            LiveLabel1.Text = System.DateTime.Now.ToString()
        End Sub
    </script>
  4. When complete, your entire file should look like the following.
    5. <%@ Page Language="VB" %>
<%@ Register TagPrefix="cc1" Namespace="Dart.PowerWEB.LiveControls" Assembly="Dart.PowerWEB.LiveControls" %>
<script runat="server">
    Sub LiveButton1_Click(sender As Object, e As EventArgs)
            LiveLabel1.Text = System.DateTime.Now.ToString()
        End Sub
</script>
<html>
<head>
</head>
<body>
    <form runat="server">
        <cc1:LiveLabel id="LiveLabel1" runat="server"></cc1:LiveLabel>
        <cc1:livebutton id="LiveButton1" onclick="LiveButton1_Click" runat="server" Text="Time" ></cc1:livebutton>
    </form>
</body>
</html>
  5. Save the file.
  6. Using IIS Administrator, create a virtual directory pointing to the directory where you just saved the file (make sure you have a bin directory containing the Dart.PowerWEB.LiveControls.dll file).
  7. Open the file in your browser, it should compile automatically and run, displaying the editor. Add some content to the editor and click the button.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Optimizing Performance

PowerWEB LiveControls for .NET can be used in a variety of scenarios with respect to Viewstate and performance. Depending on the type of application, and other Internet considerations (such as typical bandwidth of your users), you may wish to tune the LiveControls for optimal performance. This section describes steps you can take to tune for performance.

In This Section

General Performance Tips
Provides general tips for development when performance is a consideration.
ViewState Management
Describes techniques to reduce the size of ViewState.

Related Sections

Getting Started
Provides an overview of PowerWEB LiveControls for ASP.NET and discusses such topics as distribution, licensing, and support.
Using PowerWEB in VS.NET
Provides step-by-step instructions for creating a project using VS.NET, integrating PowerWEB LiveControls for ASP.NET, and creating a simple application.
Using PowerWEB with Notepad
Provides step-by-step instructions for creating a simple project using notepad only.
Advanced Topics
Discusses advanced implementations of the PowerWEB LiveControls for ASP.NET.
Reference
Provides a language/syntax and client-side API reference for PowerWEB LiveControls for ASP.NET.
Samples
Describes the samples that are installed with PowerWEB LiveControls for ASP.NET.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Optimizing Performance

Since applications built with LiveControls are intended to replicate the responsiveness of Windows applications as much as possible, server/network performance is a top priority, as even a delay as small as a few hundred milliseconds could be noticeable from a user standpoint (depending on the application).

While every situation is different, the following is a list of elements to check and techniques to use when writing LiveControl applications which will increase performance.

  • Be sure network/server hardware meets requirements.
  • Be sure IIS is tuned optimally for your application.
  • During a request, only update changed values.
  • Use string concatenation techniques.
  • Only update Microsoft/3rd party server controls when necessary.
  • Use Session DataPersistenceType (with a caveat).
  • Override Page.LoadPageStateFromPersistenceMedium and Page.SavePageStateToPersistenceMedium.

Be sure network/server hardware meets requirements.
While this is an obvious first step when creating ANY web application, if your goal is to create an optimally responsive web-based UI, your hardware and network connection is even more important. Of course, the spectrum of possible network/server configurations is enormous, especially since this configuration is application and traffic specific. As such, it is beyond the scope of this document but something to keep in mind when planning your application.

Be sure IIS is tuned optimally for your application.
Again, server tuning is a pretty basic step for creating web applications. If you are noticing excessive lag time, however, you may want to refer to the following MSDN articles for suggestions:
http://support.microsoft.com/kb/308186
http://support.microsoft.com/kb/814876

During a request, only update changed values.
Application writers must keep in mind that every property set results in extra JavaScript being sent in the callback response. This requires a little extra care in writing a LiveControl application as opposed to a standard ASP.NET control application. For example, consider the following code:

LiveLabel1.BackColor = Color.Red;
LiveLabel1.BackColor = Color.Blue;

In both applications (the LiveControl and the standard ASP.NET control), the end result will be the same...the background color of the label will be blue. However, in the standard ASP.NET control application, double setting a property like this does not have any negative repercussions. With the LiveControl application, this will result in the following JavaScript being sent:

pwObj("LiveLabel1").style.backgroundColor = "red";
pwObj("LiveLabel1").style.backgroundColor = "blue";

Obviously, this creates extra, unneeded script, thus increasing the time it takes for the data to travel over the network. As a result, be sure to do the proper checks on the server-side to eliminate this from happening. You also may want to consider using packet sniffing software to see how much data is being sent from the server to the client, and use this information to try to identify redudancies and innefficiencies.

Use string concatenation techniques.
This is basically a further illustration of the <previous technique. String concatenation commonly does not have negative implications. For example, the following code...

for(int i=0; i<100; i++)
   Label1.Text+= "Item " + i + "<br>";

...would work fine when using standard controls. However, when using LiveControls, this would cause 100 lines of redundant JavaScript code be sent to the client. Instead, perform the concatenation like so:

string txt = "";
for(int i=0; i<100; i++)
    txt+= "Item " + i + "<br>";
LiveLabel1.Text = txt;

This would only result in one line of JavaScript being sent to the client.

Only update Microsoft/3rd party server controls when necessary.
By default, all Microsoft controls are automatically checked to see if they are changed and updated if they are. Typically, this is the desired behavior. However, to prevent this from happening, add an "update='false' attribute to the server tag. This keeps the control from being checked for changes (saving processor time) and assures that no data is sent to change the data (saving network time). An example would look like:

<asp:Label ID="Label1" runat="server" update="false">Hello World</asp:Label>

Use Session DataPersistenceType (with a caveat).
By default, all LiveControls save their persistence data (typically stored in the ViewState hidden field) in the server Session object. Typically, this improves application performance, as it greatly reduces the amount of data sent over the network. However, this comes at the expense of server memory, which may not scale well for your application. In addition, this type of persistence requires the client-browser have cookies enabled.

If you would like to use Session persistence, no changes need to be made as this is the default. However, if the above requirements do not meet well with your application, you may want to switch to ViewState persistence (NOTE! This will more than likely decrease application performance). If you would like to use ViewState persistence, simply change the DataPersistenceType property:

<cc1:LiveLabel ID="LiveLabel1" runat="server" DataPersistenceType="ViewState">Hello World</cc1:LiveLabel>

This applies to Microsoft controls too:

<asp:Label ID="Label1" runat="server" DataPersistenceType="ViewState">Hello World</asp:Label>

Override Page.LoadPageStateFromPersistenceMedium and Page.SavePageStateToPersistenceMedium.
While using Session DataPersistenceType as described above eliminates most of the ViewState data sent to the client, there are some controls (such as the Page) that generate ViewState that cannot be saved to the Session from the control level. To store this in the Session, you must override the Page.LoadPageStateFromPersistenceMedium and Page.SavePageStateToPersistenceMedium methods and explicitly save the data. This would look like the following:

protected override object LoadPageStateFromPersistenceMedium()
{
    return this.Session["MyState"];
}

protected override void SavePageStateToPersistenceMedium(object viewState)
{
    this.Session.Add("MyState", viewState);
}

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Viewstate Management Techniques

State management when using LiveControls may require special emphasis. Since the application has Windows-style response to interface interactions, and provides controls associated with Windows apps such as LiveTimer, it is quite easy to forget that the communication between client and server still uses the HTTP protocol, and is therefore stateless.

As do the standard ASP.NET controls, the LiveControls use "ViewState" techniques to carry forth control state from one request to the next. The major difference is that LiveControls persist this data in the Session by default, where standard ASP.NET controls persist this data in the hidden "__ViewState" field which is round-tripped to the client with each request. This is to lessen the amount of data sent between client and server, thereby making the response to the callback quicker.

There are some limitations to storing state in the Session object. It requires that the client have cookies enabled and it increases the memory load on the server. If this is unnacceptable, you can easily change the application from Session storage of state info to "classic" ViewState storage by setting the DataPersistenceType property like so:

<cc1:LiveLabel ID="LiveLabel1" runat="server" DataPersistenceType="ViewState">Hello World</cc1:LiveLabel>

This applies to Microsoft controls too:

<asp:Label ID="Label1" runat="server" DataPersistenceType="ViewState">Hello World</asp:Label>

Also, the same caveats apply to state management when using LiveControls as to state management using standard ASP.NET controls. Namely, declared Page class members do not keep state by default and must thereby be saved (either in the Session or ViewState objects, or other persistence means) at the end of the request and reloaded at the beginning of the next request before use.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Advanced Topics

PowerWEB LiveControls for ASP.NET includes technology that goes beyond usage that is present in ASP.NET. The following topics describe some advanced features of the LiveControls technology.

In This Section

Blocking vs. non-blocking
Explains the difference between blocking and non-blocking modes.
Creating custom callbacks with LiveCallback
Describes how to use the LiveCallback control to create custom callbacks on the server.

Related Sections

Getting Started
Provides an overview of PowerWEB LiveControls for ASP.NET and discusses such topics as distribution, licensing, and support.
Using PowerWEB in VS.NET
Provides step-by-step instructions for creating a project using VS.NET, integrating PowerWEB LiveControls for ASP.NET, and creating a simple application.
Using PowerWEB with Notepad
Provides step-by-step instructions for creating a simple project using notepad only.
Optimizing Performance
Discusses techniques for optimizing performance of the the PowerWEB LiveControls for ASP.NET, including reducing ViewState and render-size.
Reference
Provides a language/syntax and client-side API reference for PowerWEB LiveControls for ASP.NET.
Samples
Describes the samples that are installed with PowerWEB LiveControls for ASP.NET.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Blocking vs Non-blocking Techniques

LiveControls communicate with the webserver with a remote scripted callback. A callback is a way to communicate with the webserver outside of the browser. This is typically done with an XmlHttp object or an HTML IFRAME element.

When using LiveControls, this communication always occurs asynchronously (NOTE! This refers specifically to CLIENT-SIDE javascript execution. There is no asynchronous behavior in the server-side LiveControls). However, it is often useful to make the application appear that it is blocking. If a pending server operation takes a few seconds to complete, you may want to provide better user feedback as well as keeping the user from further interacting with the application. This can be done using one (or various combinations) of several techniques.

First, start by creating a simple application to test. Simply drag a LiveButton on a WebForm. Double-click the LiveButton to implement the Click event. Within this event, simulate something that takes time.

[Visual Basic, C#]

[C#]
private void LiveButton1_Click(object sender, System.EventArgs e)
{
   // Pause the thread for a few seconds to simulate the time required for a long SQL query to execute
   System.Threading.Thread.Sleep(2000);
}
[Visual Basic]
 Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
   ' Pause the thread for a few seconds to simulate the time required for a long SQL query to execute
   System.Threading.Thread.Sleep(2000)
End Sub

Now, try the following techniques to see how they affect this simple application:

  • Setting the Blocking property to true.
  • Using WaitElementID/WaitMessages.
  • Using the client-side API events.

Setting the Blocking property to true.
Setting the Blocking property to true will cause the control that raises the callback to be disabled (greyed out, and unable to raise another callback) until the pending callback completes.

<cc1:LiveButton ID="LiveButton1" runat="server" Text="Click Me" Blocking="true"></cc1:LiveLabel>

Using WaitElementID/WaitMessages.
When clicking the button, you will note that the interface is unable to be updated until the callback completes. The WaitElementID and WaitMessage can be used to immediately update the interface as soon as the button is clicked. Set the WaitElementID to the ID of another control on the form, and the value of WaitMessage is displayed on as the text of this element while the callback is pending. When complete, this element will be reset to its initial value.

<cc1:LiveButton ID="LiveButton1" runat="server" Text="Click Me" WaitElementID="mylabel" WaitMessage="Processing..."></cc1:LiveLabel>
<span ID="mylabel"></span>

Using the client-side API events.
Finally, if the Blocking property and the WaitElementID do not provide enough flexibility, two client-side javascript events are exposed to enable you to update the interface during callbacks. The pwBeforeCallback() function is called before the callback is made. The pwAfterCallback() function is called after the callback completes. In this example the cursor is changed from a "pointer" to an "hourglass" while the callback is pending. To do this, simply implement these functions and they will be invoked automatically if required.

function pwBeforeCallback(){
    // Callback is getting ready to be sent. Change the cursor to an hourglass.
    this.style.cursor = "wait";
}

function pwAfterCallback(){
    // Callback is complete. Change the cursor back to a pointer.
    this.style.cursor = "default";
}

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Creating Custom Callbacks With LiveCallback

While PowerWEB LiveControls for ASP.NET includes a suite of controls that mimic many intrinsic Microsoft controls but add callback capability, some users may want to implement their own callbacks. The LiveCallback control enables a callback to occur from a browser to a user-specified function on the server. This implementation is often referred to as remote scripting. The LiveCallback function only allows strings as parameters. Using the LiveCallback control requires the implementation of 3 functions:

  1. The function to call on the server, which will reside in the Code-Behind page for the WebForm, such as WebForm1.aspx.cs.
  2. The Javascript function that will initiate the callback by calling a PowerWEB LiveControls client-side API function called pwBeginCallServerFunction().
  3. The Javascript function that will be called when the server-side result returns.

In this example, a server-side function that adds two numbers will be called from the client and return the result.

  1. Add a function to theWebForm1.aspx.cs class that adds two numbers. Make sure the paramets of this function are strings and that the return value is a string.
            public string Add(string num1, string num2)
            {
                int val = System.Convert.ToInt32(num1) + System.Convert.ToInt32(num2);
                return val.ToString();
            }
  2. Add a Microsoft Button control and a LiveCallback control to the WebForm.
  3. In the Page_Load event of the WebForm1 Code-Behind page, add an "OnClick" attribute to the Button control that will trigger a Javascript function called doAdd() when the button is pressed.
    4. Button1.Attributes.Add("OnClick","doAdd()");
  4. Add the doAdd() function to the ASPX page representing WebForm1 that calls pwBeginCallServerFunction(). The first parameter of the function is the name of the function to call on the server. In this case, the name of the server function is Add. The second parameter is the Javascript function that will be called when the server function, in this case Add, will return a result. The Javascript return function is called addResult. The third parameter is any user context information, which should remain an empty string. The fourth paramter is whether the function call should be blocking. The remaining parameters are those that should be passed to the server function. Up to nine parameters can be specified as strings. In the example below, two parameters are passed to the Add function.
    <script language='JavaScript'>
    function doAdd()
    {
            pwBeginCallServerFunction("Add", "addResult", "", false, "3", "3");
    }
</script>
  5. Finally, add the Javascript return function to the ASPX page called addResult() so the whole Javascript block will look like the example below. The return data is in the pwRsCallbackResponse object and can be referenced in the "data" property of the object.
    <script language='JavaScript'>
    function doAdd()
    {
            pwBeginCallServerFunction("Add", "addResult", "", false, "3", "3");
    }
function addResult(pwRsCallbackResponse)
    {
            alert(pwRsCallbackResponse.data);
    }
</script>
  6. Now run the web application and when the button is pressed, the alert window will appear with the number "6." There will be no postback to the server when the calculation occurs, but rather a callback.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Reference

This section contains reference documentation for all of the controls and classes that comprise PowerWEB LiveControls for ASP.NET and the JavaScript API. This section is intended solely for use as a class reference guide for use while building an application.

In This Section

Dart.PowerWeb.LiveControls Namespace
Contains classes that describe the interface of all LiveControls.

Related Sections

Getting Started
Provides an overview of PowerWEB LiveControls for ASP.NET and discusses such topics as distribution, licensing, and support.
Using PowerWEB in VS.NET
Provides step-by-step instructions for creating a project using VS.NET, integrating PowerWEB LiveControls for ASP.NET, and creating a simple application.
Using PowerWEB with Notepad
Provides step-by-step instructions for creating a simple project using notepad only.
Optimizing Performance
Discusses techniques for optimizing performance of the the PowerWEB LiveControls for ASP.NET, including reducing ViewState and render-size.
Advanced Topics
Discusses advanced implementations of the PowerWEB LiveControls for ASP.NET.
Reference
Provides a language/syntax and client-side API reference for PowerWEB LiveControls for ASP.NET.
Samples
Describes the samples that are installed with PowerWEB LiveControls for ASP.NET.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Dart.PowerWEB.LiveControls

PowerWEB LiveControls for ASP.NET

Dart.PowerWEB.LiveControls Namespace

Classes

Class | Description
KeyEventArgs | Provides data for the ILiveControl.KeyDown, ILiveControl.KeyPress or ILiveControl.KeyUp event.
LiveBoundColumn | A column type for the LiveControls.LiveDataGrid control that is bound to a field in a data source.
LiveButton | Displays a Live push button control on the Web page.
LiveButtonColumn | A column type for the LiveControls.LiveDataGrid control that contains a user-defined command button, such as Add or Remove, that corresponds with each row in the column.
LiveCallback | A control that permits any LiveControl to become Live enabled.
LiveCheckBox | Displays a check box that allows the user to select a true or false condition.
LiveCheckBoxColumn | A column type for the LiveControls.LiveDataGrid control that contains check boxes.
LiveCheckBoxList | Creates a multi selection check box group that can be dynamically created by binding the control to a data source.
LiveColumnEditorForm | Summary description for LiveColumnEditorForm.
LiveDataGrid | A data bound list control that displays the items from data source in a table. The LiveDataGrid control allows you to select, sort, and edit these items.
LiveDropDownList | Represents a control that allows the user to select a single item from a drop-down list.
LiveDropDownListColumn | A column type for the LiveControls.LiveDataGrid control that contains dropdown lists.
LiveEditCommandColumn | A special column type for the LiveControls.LiveDataGrid control that contains the Edit command buttons for editing data items in each row.
LiveFontInfo | Encapsulates the font properties of a LiveControl's text.
LiveHyperLink | A control that displays a link to another Web page.
LiveImage | Displays an image on a Web page.
LiveImageButton | A control that displays an image and responds to mouse clicks on the image.
LiveLabel | Represents a label control, which displays text on a Web page.
LiveLinkButton | Displays a hyperlink style button control on a Web page.
LiveListBox | Represents a list box control that allows single or multiple item selection.
LiveMessageBox | Displays a message box that can inform or prompt the user.
LivePanel | Represents a control that acts as a container for other controls.
LivePlaceHolder | A container to store dynamically added server controls on the Web page.
LiveRadioButton | Represents a radio button control.
LiveRadioButtonColumn | A column type for the LiveControls.LiveDataGrid control that contains radio buttons.
LiveRadioButtonList | Represents a list control that encapsulates a group of radio button controls.
LiveSound | Plays a sound file client-side during a callback.
LiveTextBox | Displays a text box control for user input.
LiveTimer | Implements a timer that raises an event at user-defined intervals.
LocationEventArgs | Provides location data for any events that occur when a user clicks on a LiveControl.
PropertyBuilder |
ResponseEventArgs | Provides data for a LiveControls.LiveMessageBox of type DialogType.Prompt or DialogType.Confirm.
Shared | Summary description for Shared.

Interfaces

Interface | Description
ILiveCallbackHandler | Provides an interface for LiveControls that performs callbacks.
ILiveControl | Provides an interface for LiveControls.
ILiveWebControl | Provides an interface for visual LiveControls.

Delegates

Delegate | Description
KeyEventHandler | The delegate for the Key event.
LocationEventHandler | The delegate for events that require location information.
ResponseEventHandler | The delegate for the Response event.

Enumerations

Enumeration | Description
BrowserType | Enumerates values which describe the Web browser in use.
DataPersistenceType | Enumerates values which describe the way data should persist on the server.
DialogType | Enumerates values which describe types of JavaScript message box.
ErrorBehavior | Enumerates values which describe the behavior when an error condition occurs.
NonEditModeBehavior | Enumerates values which describe the behavior of LiveControls.LiveCheckBoxColumn when in non-edit mode.

Send comments on this topic.

© 2003 Dart Communications. All rights reserved.


BrowserType Enumeration

Enumerates values which describe the Web browser in use.

[Visual Basic]
Public Enum BrowserType
[C#]
public enum BrowserType

Remarks

This enumeration is used by the ILiveControl.BrowserType property.

Members

Member Name | Description
NotSet | The Web browser is not set.
Unsupported | An unsupported Web browser.
IE | The Internet Explorer Web browser.
Mozilla | The Mozilla Web browser.
IE5 | The Internet Explorer 5 Web browser.
IE5Mac | The Internet Explorer Web browser for Mac.
Opera | The Opera Web browser.
Konqueror | The Konqueror Web browser.
Galeon | The Galeon Web browser.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

Dart.PowerWEB.LiveControls Namespace


DataPersistenceType Enumeration

Enumerates values which describe the way data should persist on the server.

[Visual Basic]
Public Enum DataPersistenceType
[C#]
public enum DataPersistenceType

Remarks

This enumeration is used by the ILiveControl.DataPersistenceType property.

Members

Member Name | Description
ViewState | Persist data in the Viewstate.
Session | Persist data in session variables.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

Dart.PowerWEB.LiveControls Namespace


DialogType Enumeration

Enumerates values which describe types of JavaScript message box.

[Visual Basic]
Public Enum DialogType
[C#]
public enum DialogType

Remarks

This enumeration is used as a parameter of the LiveControls.LiveMessageBox control.

Members

Member Name | Description
Alert | Show an alert box (a message with an OK button).
Prompt | Show a prompt box (a message with OK and Cancel buttons, and an input field).
Confirm | Show a confirm box (a message with OK and Cancel buttons).

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

Dart.PowerWEB.LiveControls Namespace


ErrorBehavior Enumeration

Enumerates values which describe the behavior when an error condition occurs.

[Visual Basic]
Public Enum ErrorBehavior
[C#]
public enum ErrorBehavior

Remarks

This enumeration is used by the ILiveCallbackHandler.ErrorBehavior property.

Members

Member Name | Description
ShowAlert | Show an alert box with the value of the ILiveCallbackHandler.ErrorMessage property.
ShowInBrowser | Show the exception in the browser.
Eat | Do not show the exception.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

Dart.PowerWEB.LiveControls Namespace


ILiveCallbackHandler Interface

Provides an interface for LiveControls that performs callbacks.

For a list of all members of this type, see ILiveCallbackHandler Members.

[Visual Basic]
Public Interface ILiveCallbackHandler
[C#]
public interface ILiveCallbackHandler

Remarks

Implementing this interface enables a designer to add callback abilities to a LiveControl.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

ILiveCallbackHandler Members | Dart.PowerWEB.LiveControls Namespace


ILiveCallbackHandler Members

Public Instance Properties

Blocking | Gets or sets the blocking state of the control.
EnableCallback | Gets or sets whether the control issues a callback.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.

See Also

ILiveCallbackHandler Interface | Dart.PowerWEB.LiveControls Namespace


ILiveCallbackHandler Properties

The properties of the ILiveCallbackHandler interface are listed below. For a complete list of ILiveCallbackHandler interface members, see the ILiveCallbackHandler Members topic.

Public Instance Properties

Blocking | Gets or sets the blocking state of the control.
EnableCallback | Gets or sets whether the control issues a callback.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.

See Also

ILiveCallbackHandler Interface | Dart.PowerWEB.LiveControls Namespace


ILiveCallbackHandler.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
Property Blocking As Boolean
[C#]
bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

ILiveCallbackHandler Interface | ILiveCallbackHandler Members | Dart.PowerWEB.LiveControls Namespace


ILiveCallbackHandler.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
Property EnableCallback As Boolean
[C#]
bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

ILiveCallbackHandler Interface | ILiveCallbackHandler Members | Dart.PowerWEB.LiveControls Namespace


ILiveCallbackHandler.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
Property ErrorBehavior As ErrorBehavior
[C#]
ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

ILiveCallbackHandler Interface | ILiveCallbackHandler Members | Dart.PowerWEB.LiveControls Namespace


ILiveCallbackHandler.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
Property ErrorMessage As String
[C#]
string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

ILiveCallbackHandler Interface | ILiveCallbackHandler Members | Dart.PowerWEB.LiveControls Namespace


ILiveCallbackHandler.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
Property WaitElementID As String
[C#]
string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

ILiveCallbackHandler Interface | ILiveCallbackHandler Members | Dart.PowerWEB.LiveControls Namespace


ILiveCallbackHandler.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
Property WaitMessage As String
[C#]
string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

ILiveCallbackHandler Interface | ILiveCallbackHandler Members | Dart.PowerWEB.LiveControls Namespace


ILiveControl Interface

Provides an interface for LiveControls.

For a list of all members of this type, see ILiveControl Members.

[Visual Basic]
Public Interface ILiveControl
[C#]
public interface ILiveControl

Remarks

Implementing this interface enables a designer to add Live capabilities to a server control.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

ILiveControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveControl Members

Public Instance Properties

BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
IsCallback | Gets the callback state of the LiveControl.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.

Public Instance Methods

GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetViewState | Returns the ViewState object used to save and restore state.

See Also

ILiveControl Interface | Dart.PowerWEB.LiveControls Namespace


ILiveControl Properties

The properties of the ILiveControl interface are listed below. For a complete list of ILiveControl interface members, see the ILiveControl Members topic.

Public Instance Properties

BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
IsCallback | Gets the callback state of the LiveControl.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.

See Also

ILiveControl Interface | Dart.PowerWEB.LiveControls Namespace


ILiveControl.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
Property BrowserType As BrowserType
[C#]
BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

ILiveControl Interface | ILiveControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveControl.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
Property BufferedScript As StringWriter
[C#]
System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

ILiveControl Interface | ILiveControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveControl.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
Property DataPersistenceType As DataPersistenceType
[C#]
DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

ILiveControl Interface | ILiveControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveControl.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
Property IsCallback As Boolean
[C#]
bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

ILiveControl Interface | ILiveControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveControl.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
Property ScriptsDirectory As String
[C#]
string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

ILiveControl Interface | ILiveControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveControl.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
Property Tag As Object
[C#]
object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

ILiveControl Interface | ILiveControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveControl Methods

The methods of the ILiveControl interface are listed below. For a complete list of ILiveControl interface members, see the ILiveControl Members topic.

Public Instance Methods

GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetViewState | Returns the ViewState object used to save and restore state.

See Also

ILiveControl Interface | Dart.PowerWEB.LiveControls Namespace


ILiveControl.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
Function GetScript() As String
[C#]
string GetScript();

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

ILiveControl Interface | ILiveControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveControl.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
Function GetScriptObjectReference() As String
[C#]
string GetScriptObjectReference();

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

ILiveControl Interface | ILiveControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveControl.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
Function GetScriptStyleReference() As String
[C#]
string GetScriptStyleReference();

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

ILiveControl Interface | ILiveControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveControl.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
Function GetViewState() As Object
[C#]
object GetViewState();

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

ILiveControl Interface | ILiveControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl Interface

Provides an interface for visual LiveControls.

For a list of all members of this type, see ILiveWebControl Members.

[Visual Basic]
Public Interface ILiveWebControl
[C#]
public interface ILiveWebControl

Remarks

Implementing this interface enables a designer to add Live capabilities to a server control with visual properties.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl Members

Public Instance Properties

Display | Gets or sets a value indicating whether the LiveControl is visible.
FontEx | Gets the font properties associated with the LiveControl.
Left | Gets or sets the left position of the LiveControl.
Top | Gets or sets the top position of the LiveControl.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.

See Also

ILiveWebControl Interface | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl Properties

The properties of the ILiveWebControl interface are listed below. For a complete list of ILiveWebControl interface members, see the ILiveWebControl Members topic.

Public Instance Properties

Display | Gets or sets a value indicating whether the LiveControl is visible.
FontEx | Gets the font properties associated with the LiveControl.
Left | Gets or sets the left position of the LiveControl.
Top | Gets or sets the top position of the LiveControl.

See Also

ILiveWebControl Interface | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
Property Display As Boolean
[C#]
bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
Property FontEx As LiveFontInfo
[C#]
LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
Property Left As Unit
[C#]
System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
Property Top As Unit
[C#]
System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl Events

The events of the ILiveWebControl interface are listed below. For a complete list of ILiveWebControl interface members, see the ILiveWebControl Members topic.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.

See Also

ILiveWebControl Interface | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Event ContextMenuChanged As LocationEventHandler
[C#]
event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Event DoubleClick As LocationEventHandler
[C#]
event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Event GotFocus As EventHandler
[C#]
event EventHandler GotFocus;

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Event HelpRequested As LocationEventHandler
[C#]
event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Event KeyDown As KeyEventHandler
[C#]
event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Event KeyPress As KeyEventHandler
[C#]
event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Event KeyUp As KeyEventHandler
[C#]
event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Event LocationClick As LocationEventHandler
[C#]
event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Event LostFocus As EventHandler
[C#]
event EventHandler LostFocus;

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Event MouseDown As LocationEventHandler
[C#]
event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Event MouseEnter As LocationEventHandler
[C#]
event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Event MouseLeave As LocationEventHandler
[C#]
event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


ILiveWebControl.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Event MouseUp As LocationEventHandler
[C#]
event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

ILiveWebControl Interface | ILiveWebControl Members | Dart.PowerWEB.LiveControls Namespace


KeyEventArgs Class

Provides data for the ILiveControl.KeyDown, ILiveControl.KeyPress or ILiveControl.KeyUp event.

For a list of all members of this type, see KeyEventArgs Members.

System.Object
EventArgs
KeyEventArgs

[Visual Basic]
Public Class KeyEventArgs
Inherits EventArgs
[C#]
public class KeyEventArgs : EventArgs

Remarks

A KeyEventArgs, which specifies the key the user pressed and whether any modifier keys (CTRL, ALT, and SHIFT) were pressed at the same time, is passed with each ILiveControl.KeyDown, ILiveControl.KeyPress or ILiveControl.KeyUp event.

The ILiveControl.KeyDown event occurs when the user presses any key. The ILiveControl.KeyUp event occurs when the user releases the key. Duplicate ILiveControl.KeyDown events occur each time the key repeats, if the key is held down, but only one ILiveControl.KeyUp event is generated when the user releases the key. The ILiveControl.KeyPress event also occurs when a key is depressed.

For information about the event model, see Events and Delegates.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

KeyEventArgs Members | Dart.PowerWEB.LiveControls Namespace


KeyEventArgs Members

Public Instance Constructors

KeyEventArgs Overloaded. Initialize a new instance of the KeyEventArgs class.

Public Instance Properties

Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

KeyEventArgs Class | Dart.PowerWEB.LiveControls Namespace


KeyEventArgs Constructor

Initializes a new instance of KeyEventArgs.

Overload List

Initializes a new instance of KeyEventArgs.

public KeyEventArgs();

Initializes a new instance of KeyEventArgs.

public KeyEventArgs(int,bool,bool,bool);

See Also

KeyEventArgs Class | KeyEventArgs Members | Dart.PowerWEB.LiveControls Namespace


KeyEventArgs Constructor ()

Initializes a new instance of KeyEventArgs.

[Visual Basic]
Overloads Public Sub New()
[C#]
public KeyEventArgs();

Remarks

The default constructor initializes a new instance of KeyEventArgs.

See Also

KeyEventArgs Class | KeyEventArgs Members | Dart.PowerWEB.LiveControls Namespace | KeyEventArgs Constructor Overload List


KeyEventArgs Constructor (Int32, Boolean, Boolean, Boolean)

Initializes a new instance of KeyEventArgs.

[Visual Basic]
Overloads Public Sub New( _
   ByVal keyCode As Integer, _
   ByVal alt As Boolean, _
   ByVal control As Boolean, _
   ByVal shift As Boolean _
)
[C#]
public KeyEventArgs(
   int keyCode,
   bool alt,
   bool control,
   bool shift
);

Remarks

The constructor initializes a new instance of KeyEventArgs with KeyEventArgs.KeyCode, KeyEventArgs.Alt, KeyEventArgs.Control, KeyEventArgs.Shift.

See Also

KeyEventArgs Class | KeyEventArgs Members | Dart.PowerWEB.LiveControls Namespace | KeyEventArgs Constructor Overload List


KeyEventArgs Properties

The properties of the KeyEventArgs class are listed below. For a complete list of KeyEventArgs class members, see the KeyEventArgs Members topic.

Public Instance Properties

Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

See Also

KeyEventArgs Class | Dart.PowerWEB.LiveControls Namespace


KeyEventArgs.Alt Property

Gets a value indicating whether the ALT key was pressed.

[Visual Basic]
Public Property Alt As Boolean
[C#]
public bool Alt {get; set;}

Property Value

true if the ALT key was pressed; otherwise, false.

Remarks

Use this property to determine if the ALT key was pressed during the LiveControl event.

See Also

KeyEventArgs Class | KeyEventArgs Members | Dart.PowerWEB.LiveControls Namespace


KeyEventArgs.Control Property

Gets a value indicating whether the CTRL key was pressed.

[Visual Basic]
Public Property Control As Boolean
[C#]
public bool Control {get; set;}

Property Value

true if the CTRL key was pressed; otherwise, false.

Remarks

Use this property to determine if the CTRL key was pressed during the LiveControl event.

See Also

KeyEventArgs Class | KeyEventArgs Members | Dart.PowerWEB.LiveControls Namespace


KeyEventArgs.KeyCode Property

Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.

[Visual Basic]
Public Property KeyCode As Integer
[C#]
public int KeyCode {get; set;}

Property Value

A Keys value that is the key code for the event.

Remarks

Use this property to determine the key corresponding to LiveControl event.

See Also

KeyEventArgs Class | KeyEventArgs Members | Dart.PowerWEB.LiveControls Namespace


KeyEventArgs.Shift Property

Gets a value indicating whether the SHIFT key was pressed.

[Visual Basic]
Public Property Shift As Boolean
[C#]
public bool Shift {get; set;}

Property Value

true if the SHIFT key was pressed; otherwise, false.

Remarks

Use this property to determine if the SHIFT key was pressed during the LiveControl event.

See Also

KeyEventArgs Class | KeyEventArgs Members | Dart.PowerWEB.LiveControls Namespace


KeyEventHandler Delegate

The delegate for the Key event.

[Visual Basic]
Public Delegate Sub KeyEventHandler( _
   ByVal sender As Object, _
   ByVal e As KeyEventArgs _
)
[C#]
public delegate void KeyEventHandler(
   object sender,
   KeyEventArgs e
);

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

Dart.PowerWEB.LiveControls Namespace


LiveBoundColumn Class

A column type for the LiveControls.LiveDataGrid control that is bound to a field in a data source.

For a list of all members of this type, see LiveBoundColumn Members.

System.Object
DataGridColumn
BoundColumn
LiveBoundColumn

[Visual Basic]
Public Class LiveBoundColumn
Inherits BoundColumn
[C#]
public class LiveBoundColumn : BoundColumn

Remarks

Use the LiveBoundColumn column type in a LiveControls.LiveDataGrid control to display the contents of a field in the data source. The values are listed in a single column. The field is linked to the LiveBoundColumn, so any updates in the data source will reflect in the corresponding cells of the LiveControls.LiveDataGrid control.

Note This column type is the default for the LiveControls.LiveDataGrid control.

To control appearance of this column, use the style properties of the LiveControls.LiveDataGrid control.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveBoundColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveBoundColumn Members

Public Instance Constructors

LiveBoundColumn Constructor Initializes a new instance of LiveBoundColumn.

Public Instance Properties

DataField (inherited from BoundColumn) | Gets or sets the field name from the data source to bind to the BoundColumn.
DataFormatString (inherited from BoundColumn) | Gets or sets the string that specifies the display format for items in the column.
FooterStyle (inherited from DataGridColumn) | Gets the style properties for the footer section of the column.
FooterText (inherited from DataGridColumn) | Gets or sets the text displayed in the footer section of the column.
HeaderImageUrl (inherited from DataGridColumn) | Gets or sets the location of an image to display in the header section of the column.
HeaderStyle (inherited from DataGridColumn) | Gets the style properties for the header section of the column.
HeaderText (inherited from DataGridColumn) | Gets or sets the text displayed in the header section of the column.
ItemStyle (inherited from DataGridColumn) | Gets the style properties for the item cells of the column.
ReadOnly (inherited from BoundColumn) | Gets or sets a value that indicates whether the items in the BoundColumn can be edited.
SortExpression (inherited from DataGridColumn) | Gets or sets the name of the field or expression to pass to the OnSortCommand method when a column is selected for sorting.
Visible (inherited from DataGridColumn) | Gets or sets a value that indicates whether the column is visible in the DataGrid control.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from BoundColumn) | Resets the BoundColumn to its initial state.
InitializeCell | Resets the specified cell in the LiveBoundColumn to its initial state.
ToString (inherited from DataGridColumn) |

Explicit Interface Implementations

IStateManager.LoadViewState (inherited from DataGridColumn)
IStateManager.SaveViewState (inherited from DataGridColumn)
IStateManager.TrackViewState (inherited from DataGridColumn)

See Also

LiveBoundColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveBoundColumn Constructor

Initializes a new instance of LiveBoundColumn.

[Visual Basic]
Public Sub New()
[C#]
public LiveBoundColumn();

Remarks

The default constructor initializes a new instance of LiveBoundColumn.

See Also

LiveBoundColumn Class | LiveBoundColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveBoundColumn Methods

The methods of the LiveBoundColumn class are listed below. For a complete list of LiveBoundColumn class members, see the LiveBoundColumn Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from BoundColumn) | Resets the BoundColumn to its initial state.
InitializeCell | Resets the specified cell in the LiveBoundColumn to its initial state.
ToString (inherited from DataGridColumn) |

Explicit Interface Implementations

IStateManager.LoadViewState (inherited from DataGridColumn)
IStateManager.SaveViewState (inherited from DataGridColumn)
IStateManager.TrackViewState (inherited from DataGridColumn)

See Also

LiveBoundColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveBoundColumn.InitializeCell Method

Resets the specified cell in the LiveBoundColumn to its initial state.

[Visual Basic]
Overrides Public Sub InitializeCell( _
   ByVal cell As TableCell, _
   ByVal columnIndex As Integer, _
   ByVal itemType As ListItemType _
)
[C#]
public override void InitializeCell(
   TableCell cell,
   int columnIndex,
   ListItemType itemType
);

Parameters

cell
A TableCell object that represents the cell to reset.
columnIndex
The column number where the cell is located.
itemType
One of the ListItemType values.

Remarks

The InitializeCell method resets the specified cell in the LiveControls.LiveBoundColumn to its initial state.

See Also

LiveBoundColumn Class | LiveBoundColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveButton Class

Displays a Live push button control on the Web page.

For a list of all members of this type, see LiveButton Members.

System.Object
Control
WebControl
Button
LiveButton

[Visual Basic]
Public Class LiveButton
Inherits Button
Implements ILiveControl, ILiveWebControl, ILiveCallbackHandler
[C#]
public class LiveButton : Button, ILiveControl, ILiveWebControl, ILiveCallbackHandler

Remarks

Use the LiveButton control to create a push button on the Web page. You can create either a submit button or a command button.

A submit button does not have a command name (specified by the CommandName property) associated with the button and simply posts the Web page back to the server. By default, a LiveButton control is a submit button. You can provide an event handler for the Click event to programmatically control the actions performed when the submit button is clicked.

A command button has a command name associated with the button, such as Sort, by setting the CommandName property. This allows you to create multiple LiveButton controls on a Web page and programmatically determine which LiveButton control is clicked. You can also use the CommandArgument property with a command button to provide additional information about the command to perform, such as Ascending. You can provide an event handler for the Command event to programmatically control the actions performed when the command button is clicked.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton Members

Public Instance Constructors

LiveButton Constructor Initializes a new instance of LiveButton.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
CausesValidation (inherited from Button) | Gets or sets a value indicating whether validation is performed when the Button control is clicked.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
CommandArgument (inherited from Button) | Gets or sets an optional parameter passed to the Command event along with the associated CommandName.
CommandName (inherited from Button) | Gets or sets the command name associated with the Button control that is passed to the Command event.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text caption displayed in the LiveButton control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

Click (inherited from Button) | Occurs when the Button control is clicked.
Command (inherited from Button) | Occurs when the Button control is clicked.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveButton Class | Dart.PowerWEB.LiveControls Namespace


LiveButton Constructor

Initializes a new instance of LiveButton.

[Visual Basic]
Public Sub New()
[C#]
public LiveButton();

Remarks

The default constructor initializes a new instance of LiveButton.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton Properties

The properties of the LiveButton class are listed below. For a complete list of LiveButton class members, see the LiveButton Members topic.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
CausesValidation (inherited from Button) | Gets or sets a value indicating whether validation is performed when the Button control is clicked.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
CommandArgument (inherited from Button) | Gets or sets an optional parameter passed to the Command event along with the associated CommandName.
CommandName (inherited from Button) | Gets or sets the command name associated with the Button control that is passed to the Command event.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text caption displayed in the LiveButton control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveButton Class | Dart.PowerWEB.LiveControls Namespace


LiveButton.AccessKey Property

Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.

[Visual Basic]
Overrides Public Property AccessKey As String
[C#]
public override string AccessKey {get; set;}

Property Value

The access key for quick navigation to the LiveControl. The default value is String.Empty, which indicates that this property is not set.

Remarks

Use the AccessKey property to specify the keyboard shortcut for the LiveControl. This allows you to navigate quickly to the control by pressing the ALT key and the key for the specified character on the keyboard. For example, setting the access key of a control to the string "D" indicates that the user can navigate to the control by pressing ALT+D.

Only a single character string is allowed for the AccessKey property. If you attempt to set this property to a value that is not a null reference (Nothing in Visual Basic), String.Empty, or a single character string, an exception is thrown.

Exceptions

Exception Type | Condition
ArgumentException | The specified access key is not either a null reference (Nothing in Visual Basic), String.Empty, or a single character string.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.Text Property

Gets or sets the text caption displayed in the LiveButton control.

[Visual Basic]
Public Property Text As String
[C#]
new public string Text {get; set;}

Property Value

The text caption displayed in the LiveButton control. The default value is String.Empty.

Remarks

Use the Text property to specify or determine the caption to display in the LiveButton control.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton Methods

The methods of the LiveButton class are listed below. For a complete list of LiveButton class members, see the LiveButton Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveButton Class | Dart.PowerWEB.LiveControls Namespace


LiveButton.GetCallbackEventReference Method

Returns JavaScript that can be used to initiate a callback to the server.

[Visual Basic]
Public Function GetCallbackEventReference( _
   ByVal eventName As String, _
   ByVal argument As String _
) As String
[C#]
public string GetCallbackEventReference(
   string eventName,
   string argument
);

Parameters

eventName
The event corresponding to the callback.
argument
The event arguments for the callback.

Remarks

Returns JavaScript that can be used to initiate a callback to the server.

The settings of the LiveControl (blocking, errorhandling, etc) are automatically taken into account.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.IPostBackEventHandler.RaisePostBackEvent Method

[Visual Basic]
Sub RaisePostBackEvent( _
   ByVal eventArgument As String _
) Implements _
   IPostBackEventHandler.RaisePostBackEvent
[C#]
new void IPostBackEventHandler.RaisePostBackEvent(
   string eventArgument
);

Implements

IPostBackEventHandler.RaisePostBackEvent

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton Events

The events of the LiveButton class are listed below. For a complete list of LiveButton class members, see the LiveButton Members topic.

Public Instance Events

Click (inherited from Button) | Occurs when the Button control is clicked.
Command (inherited from Button) | Occurs when the Button control is clicked.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveButton Class | Dart.PowerWEB.LiveControls Namespace


LiveButton.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButton.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveButton Class | LiveButton Members | Dart.PowerWEB.LiveControls Namespace


LiveButtonColumn Class

A column type for the LiveControls.LiveDataGrid control that contains a user-defined command button, such as Add or Remove, that corresponds with each row in the column.

For a list of all members of this type, see LiveButtonColumn Members.

System.Object
DataGridColumn
ButtonColumn
LiveButtonColumn

[Visual Basic]
Public Class LiveButtonColumn
Inherits ButtonColumn
[C#]
public class LiveButtonColumn : ButtonColumn

Remarks

Use the LiveButtonColumn column type in a LiveControls.LiveDataGrid control to create a command button that corresponds with each row in the LiveControls.LiveDataGrid control. Specify the caption displayed in the command buttons by setting the Text property.

Note If you set the Text property, all command buttons in the column share the same caption.

Alternatively, you can bind the LiveButtonColumn column to a field in a data source. This allows you to display different captions for the command buttons in the column. The values in the specified field are used for the text caption. Set the DataTextField property to bind the column to a field in a data source.

You can format the captions displayed in the command buttons by setting the DataTextField property with a formatting string.

Clicking on the command buttons in the column raises the ItemCommand event. You can programmatically control the action performed when the command button is clicked by providing an event handler for the ItemCommand event.

Note Unlike regular button controls, validation in not performed when the buttons in the LiveButtonColumn are clicked. To create a column with buttons that perform validation when clicked, add a button control, such as LiveButton or LiveLinkButton, to a TemplateColumn.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveButtonColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveButtonColumn Members

Public Instance Constructors

LiveButtonColumn Constructor Initializes a new instance of LiveButtonColumn.

Public Instance Properties

ButtonType (inherited from ButtonColumn) | Gets or sets the type of button to display in the ButtonColumn column.
CommandName (inherited from ButtonColumn) | Gets or sets a string that represents the command to perform when a button in the ButtonColumn is clicked.
DataTextField (inherited from ButtonColumn) | Gets or sets the field name from a data source to bind to the ButtonColumn.
DataTextFormatString (inherited from ButtonColumn) | Gets or sets the string that specifies the display format for the caption in each command button.
FooterStyle (inherited from DataGridColumn) | Gets the style properties for the footer section of the column.
FooterText (inherited from DataGridColumn) | Gets or sets the text displayed in the footer section of the column.
HeaderImageUrl (inherited from DataGridColumn) | Gets or sets the location of an image to display in the header section of the column.
HeaderStyle (inherited from DataGridColumn) | Gets the style properties for the header section of the column.
HeaderText (inherited from DataGridColumn) | Gets or sets the text displayed in the header section of the column.
ItemStyle (inherited from DataGridColumn) | Gets the style properties for the item cells of the column.
SortExpression (inherited from DataGridColumn) | Gets or sets the name of the field or expression to pass to the OnSortCommand method when a column is selected for sorting.
Text (inherited from ButtonColumn) | Gets or sets the caption displayed in the command buttons of the ButtonColumn.
Visible (inherited from DataGridColumn) | Gets or sets a value that indicates whether the column is visible in the DataGrid control.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ButtonColumn) | Resets the ButtonColumn to its initial state.
InitializeCell | Resets the specified cell in the LiveButtonColumn to its initial state.
ToString (inherited from DataGridColumn) |

Explicit Interface Implementations

IStateManager.LoadViewState (inherited from DataGridColumn)
IStateManager.SaveViewState (inherited from DataGridColumn)
IStateManager.TrackViewState (inherited from DataGridColumn)

See Also

LiveButtonColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveButtonColumn Constructor

Initializes a new instance of LiveButtonColumn.

[Visual Basic]
Public Sub New()
[C#]
public LiveButtonColumn();

Remarks

The default constructor initializes a new instance of LiveButtonColumn.

See Also

LiveButtonColumn Class | LiveButtonColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveButtonColumn Methods

The methods of the LiveButtonColumn class are listed below. For a complete list of LiveButtonColumn class members, see the LiveButtonColumn Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ButtonColumn) | Resets the ButtonColumn to its initial state.
InitializeCell | Resets the specified cell in the LiveButtonColumn to its initial state.
ToString (inherited from DataGridColumn) |

Explicit Interface Implementations

IStateManager.LoadViewState (inherited from DataGridColumn)
IStateManager.SaveViewState (inherited from DataGridColumn)
IStateManager.TrackViewState (inherited from DataGridColumn)

See Also

LiveButtonColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveButtonColumn.InitializeCell Method

Resets the specified cell in the LiveButtonColumn to its initial state.

[Visual Basic]
Overrides Public Sub InitializeCell( _
   ByVal cell As TableCell, _
   ByVal columnIndex As Integer, _
   ByVal itemType As ListItemType _
)
[C#]
public override void InitializeCell(
   TableCell cell,
   int columnIndex,
   ListItemType itemType
);

Parameters

cell
A TableCell object that represents the cell to reset.
columnIndex
The column number where the cell is located.
itemType
One of the ListItemType values.

Remarks

The InitializeCell method resets the specified cell in the LiveControls.LiveButtonColumn to its initial state.

See Also

LiveButtonColumn Class | LiveButtonColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback Class

A control that permits any LiveControl to become Live enabled.

For a list of all members of this type, see LiveCallback Members.

System.Object
Control
LiveCallback

[Visual Basic]
Public Class LiveCallback
Inherits Control
Implements ILiveControl, ILiveCallbackHandler, IPostBackEventHandler
[C#]
public class LiveCallback : Control, ILiveControl, ILiveCallbackHandler, IPostBackEventHandler

Remarks

Use the LiveCallback control to add callbacks to any LiveControl.

Usage requires implementation of two JavaScript functions (one that makes the callback and one to handle the response), and a server-side function to be triggered. See the topic Walkthrough: Manipulating Intrinsic Microsoft Controls in a Callback for more details.

Note The server-side function can have a maximum of nine parameters. All parameters must be strings.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback Members

Public Instance Constructors

LiveCallback Constructor Initializes a new instance of LiveCallback.

Public Instance Properties

BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
EnableCallback | Gets or sets whether the control issues a callback.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible (inherited from Control) | Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.

Public Instance Methods

DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveCallback Class | Dart.PowerWEB.LiveControls Namespace


LiveCallback Constructor

Initializes a new instance of LiveCallback.

[Visual Basic]
Public Sub New()
[C#]
public LiveCallback();

Remarks

The default constructor initializes a new instance of LiveFunction.

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback Properties

The properties of the LiveCallback class are listed below. For a complete list of LiveCallback class members, see the LiveCallback Members topic.

Public Instance Properties

BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
EnableCallback | Gets or sets whether the control issues a callback.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible (inherited from Control) | Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.

See Also

LiveCallback Class | Dart.PowerWEB.LiveControls Namespace


LiveCallback.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback Methods

The methods of the LiveCallback class are listed below. For a complete list of LiveCallback class members, see the LiveCallback Members topic.

Public Instance Methods

DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveCallback Class | Dart.PowerWEB.LiveControls Namespace


LiveCallback.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCallback.IPostBackEventHandler.RaisePostBackEvent Method

[Visual Basic]
Sub RaisePostBackEvent( _
   ByVal eventArgument As String _
) Implements _
   IPostBackEventHandler.RaisePostBackEvent
[C#]
void IPostBackEventHandler.RaisePostBackEvent(
   string eventArgument
);

Implements

IPostBackEventHandler.RaisePostBackEvent

See Also

LiveCallback Class | LiveCallback Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox Class

Displays a check box that allows the user to select a true or false condition.

For a list of all members of this type, see LiveCheckBox Members.

System.Object
Control
WebControl
CheckBox
LiveCheckBox

[Visual Basic]
Public Class LiveCheckBox
Inherits CheckBox
Implements ILiveControl, ILiveWebControl, ILiveCallbackHandler
[C#]
public class LiveCheckBox : CheckBox, ILiveControl, ILiveWebControl, ILiveCallbackHandler

Remarks

Use the LiveCheckBox control to allow the user to select a true or false state.

If you plan to use multiple LiveCheckBox controls, the LiveControls.LiveCheckBoxList control is an alternative control that provides convenient data binding capabilities. However, individual LiveCheckBox controls provide greater control over layout.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox Members

Public Instance Constructors

LiveCheckBox Constructor Initializes a new instance of LiveCheckBox.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
Checked | Gets or sets a value indicating whether the LiveControls.LiveCheckBox control is checked.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text label associated with the LiveControls.LiveCheckBox.
TextAlign | Gets or sets the alignment of the text label associated with the LiveControls.LiveCheckBox control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

CheckedChanged (inherited from CheckBox) | Occurs when the value of the Checked property changes between posts to the server.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

See Also

LiveCheckBox Class | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox Constructor

Initializes a new instance of LiveCheckBox.

[Visual Basic]
Public Sub New()
[C#]
public LiveCheckBox();

Remarks

The default constructor initializes a new instance of LiveCheckBox.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox Properties

The properties of the LiveCheckBox class are listed below. For a complete list of LiveCheckBox class members, see the LiveCheckBox Members topic.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
Checked | Gets or sets a value indicating whether the LiveControls.LiveCheckBox control is checked.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text label associated with the LiveControls.LiveCheckBox.
TextAlign | Gets or sets the alignment of the text label associated with the LiveControls.LiveCheckBox control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveCheckBox Class | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.AccessKey Property

Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.

[Visual Basic]
Overrides Public Property AccessKey As String
[C#]
public override string AccessKey {get; set;}

Property Value

The access key for quick navigation to the LiveControl. The default value is String.Empty, which indicates that this property is not set.

Remarks

Use the AccessKey property to specify the keyboard shortcut for the LiveControl. This allows you to navigate quickly to the control by pressing the ALT key and the key for the specified character on the keyboard. For example, setting the access key of a control to the string "D" indicates that the user can navigate to the control by pressing ALT+D.

Only a single character string is allowed for the AccessKey property. If you attempt to set this property to a value that is not a null reference (Nothing in Visual Basic), String.Empty, or a single character string, an exception is thrown.

Exceptions

Exception Type | Condition
ArgumentException | The specified access key is not either a null reference (Nothing in Visual Basic), String.Empty, or a single character string.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.AutoPostBack Property

Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.

[Visual Basic]
Overrides Public Property AutoPostBack As Boolean
[C#]
public override bool AutoPostBack {get; set;}

Property Value

true whenever the user changes the text in the text box and then tabs out of the control; otherwise, false. The default is true, which is different than the non-Live TextBox.

Remarks

For Live List Controls, set this property to true if the server needs to capture the change as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's selection from the list control. This property can be used to allow automatic population of other controls on the Web page based on a user's selection from the list.

For LiveCheckBox and LiveRadioButton, use this property to specify whether the state of the LiveControl is posted back to the server when clicked.

Note When AutoPostBack is true and ILiveCallbackHandler.EnableCallback is true, the LiveControl will perform automatic callbacks. If ILiveCallbackHandler.EnableCallback is false, traditional postbacks will occur.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.Checked Property

Gets or sets a value indicating whether the LiveControls.LiveCheckBox control is checked.

[Visual Basic]
Overrides Public Property Checked As Boolean
[C#]
public override bool Checked {get; set;}

Property Value

true to indicate a checked state; otherwise, false. The default is false.

Remarks

Use this property to determine whether the LiveControls.LiveCheckBox control is checked. This property can also be used to programmatically set the state of the LiveControls.LiveCheckBox control.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.Text Property

Gets or sets the text label associated with the LiveControls.LiveCheckBox.

[Visual Basic]
Public Property Text As String
[C#]
new public string Text {get; set;}

Property Value

The text label associated with the LiveControls.LiveCheckBox. The default value is String.Empty.

Remarks

Use this property to specify the text label associated with the LiveControls.LiveCheckBox control. This property can also be used to programmatically get the text label associated with the LiveControls.LiveCheckBox control.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.TextAlign Property

Gets or sets the alignment of the text label associated with the LiveControls.LiveCheckBox control.

[Visual Basic]
Public Property TextAlign As TextAlign
[C#]
new public System.Web.UI.WebControls.TextAlign TextAlign {get; set;}

Property Value

One of the TextAlign values. The default value is Right.

Remarks

Use this property to specify the alignment of the text label associated with the LiveControls.LiveCheckBox control. You can specify whether the text label appears to the right or left of the check box. Use the LiveCheckBox.Text property to specify the label text.

Exceptions

Exception Type | Condition
ArgumentException | The specified value is not one of the TextAlign values.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox Methods

The methods of the LiveCheckBox class are listed below. For a complete list of LiveCheckBox class members, see the LiveCheckBox Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

See Also

LiveCheckBox Class | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.GetCallbackEventReference Method

Returns JavaScript that can be used to initiate a callback to the server.

[Visual Basic]
Public Function GetCallbackEventReference( _
   ByVal eventName As String, _
   ByVal argument As String _
) As String
[C#]
public string GetCallbackEventReference(
   string eventName,
   string argument
);

Parameters

eventName
The event corresponding to the callback.
argument
The event arguments for the callback.

Remarks

Returns JavaScript that can be used to initiate a callback to the server.

The settings of the LiveControl (blocking, errorhandling, etc) are automatically taken into account.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.IPostBackDataHandler.LoadPostData Method

When implemented by a class, processes post back data for an ASP.NET server control.

[Visual Basic]
Function LoadPostData( _
   ByVal postDataKey As String, _
   ByVal postCollection As NameValueCollection _
) As Boolean Implements _
   IPostBackDataHandler.LoadPostData
[C#]
new bool IPostBackDataHandler.LoadPostData(
   string postDataKey,
   NameValueCollection postCollection
);

Parameters

postDataKey
The key identifier for the control.
postCollection
The collection of all incoming name values.

Implements

IPostBackDataHandler.LoadPostData

Remarks

The Web Forms page framework tracks all the server control's that return true to this method call, then invokes the IPostBackDataHandler.RaisePostDataChangedEvent on those controls.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.IPostBackDataHandler.RaisePostDataChangedEvent Method

When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

[Visual Basic]
Sub RaisePostDataChangedEvent() Implements _
   IPostBackDataHandler.RaisePostDataChangedEvent
[C#]
new void IPostBackDataHandler.RaisePostDataChangedEvent();

Implements

IPostBackDataHandler.RaisePostDataChangedEvent

Remarks

Change events for the server control that implements this interface, if any, are raised from this method.

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox Events

The events of the LiveCheckBox class are listed below. For a complete list of LiveCheckBox class members, see the LiveCheckBox Members topic.

Public Instance Events

CheckedChanged (inherited from CheckBox) | Occurs when the value of the Checked property changes between posts to the server.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveCheckBox Class | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBox.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBox Class | LiveCheckBox Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxColumn Class

A column type for the LiveControls.LiveDataGrid control that contains check boxes.

For a list of all members of this type, see LiveCheckBoxColumn Members.

System.Object
DataGridColumn
BoundColumn
LiveCheckBoxColumn

[Visual Basic]
Public Class LiveCheckBoxColumn
Inherits BoundColumn
[C#]
public class LiveCheckBoxColumn : BoundColumn

Remarks

Use the LiveCheckBoxColumn column type in a LiveControls.LiveDataGrid control to create a check box that corresponds with each row in the LiveControls.LiveDataGrid control.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveCheckBoxColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxColumn Members

Public Instance Constructors

LiveCheckBoxColumn Constructor Initializes a new instance of LiveCheckBoxColumn.

Public Instance Properties

AutoPostback | Gets or sets a value indicating whether the check boxes automatically post back to the server when checked.
DataField (inherited from BoundColumn) | Gets or sets the field name from the data source to bind to the BoundColumn.
DataFormatString (inherited from BoundColumn) | Gets or sets the string that specifies the display format for items in the column.
FooterStyle (inherited from DataGridColumn) | Gets the style properties for the footer section of the column.
FooterText (inherited from DataGridColumn) | Gets or sets the text displayed in the footer section of the column.
HeaderImageUrl (inherited from DataGridColumn) | Gets or sets the location of an image to display in the header section of the column.
HeaderStyle (inherited from DataGridColumn) | Gets the style properties for the header section of the column.
HeaderText (inherited from DataGridColumn) | Gets or sets the text displayed in the header section of the column.
ItemStyle (inherited from DataGridColumn) | Gets the style properties for the item cells of the column.
NonEditModeBehavior | Gets or sets a value indicating the behavior of the control when not in edit mode.
ReadOnly (inherited from BoundColumn) | Gets or sets a value that indicates whether the items in the BoundColumn can be edited.
SortExpression (inherited from DataGridColumn) | Gets or sets the name of the field or expression to pass to the OnSortCommand method when a column is selected for sorting.
Visible (inherited from DataGridColumn) | Gets or sets a value that indicates whether the column is visible in the DataGrid control.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from BoundColumn) | Resets the BoundColumn to its initial state.
InitializeCell | Resets the specified cell in the LiveCheckBoxColumn to its initial state.
ToString (inherited from DataGridColumn) |

Explicit Interface Implementations

IStateManager.LoadViewState (inherited from DataGridColumn)
IStateManager.SaveViewState (inherited from DataGridColumn)
IStateManager.TrackViewState (inherited from DataGridColumn)

See Also

LiveCheckBoxColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxColumn Constructor

Initializes a new instance of LiveCheckBoxColumn.

[Visual Basic]
Public Sub New()
[C#]
public LiveCheckBoxColumn();

Remarks

The default constructor initializes a new instance of LiveCheckBoxColumn.

See Also

LiveCheckBoxColumn Class | LiveCheckBoxColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxColumn Properties

The properties of the LiveCheckBoxColumn class are listed below. For a complete list of LiveCheckBoxColumn class members, see the LiveCheckBoxColumn Members topic.

Public Instance Properties

AutoPostback | Gets or sets a value indicating whether the check boxes automatically post back to the server when checked.
DataField (inherited from BoundColumn) | Gets or sets the field name from the data source to bind to the BoundColumn.
DataFormatString (inherited from BoundColumn) | Gets or sets the string that specifies the display format for items in the column.
FooterStyle (inherited from DataGridColumn) | Gets the style properties for the footer section of the column.
FooterText (inherited from DataGridColumn) | Gets or sets the text displayed in the footer section of the column.
HeaderImageUrl (inherited from DataGridColumn) | Gets or sets the location of an image to display in the header section of the column.
HeaderStyle (inherited from DataGridColumn) | Gets the style properties for the header section of the column.
HeaderText (inherited from DataGridColumn) | Gets or sets the text displayed in the header section of the column.
ItemStyle (inherited from DataGridColumn) | Gets the style properties for the item cells of the column.
NonEditModeBehavior | Gets or sets a value indicating the behavior of the control when not in edit mode.
ReadOnly (inherited from BoundColumn) | Gets or sets a value that indicates whether the items in the BoundColumn can be edited.
SortExpression (inherited from DataGridColumn) | Gets or sets the name of the field or expression to pass to the OnSortCommand method when a column is selected for sorting.
Visible (inherited from DataGridColumn) | Gets or sets a value that indicates whether the column is visible in the DataGrid control.

See Also

LiveCheckBoxColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxColumn.AutoPostback Property

Gets or sets a value indicating whether the check boxes automatically post back to the server when checked.

[Visual Basic]
Public Property AutoPostback As Boolean
[C#]
public bool AutoPostback {get; set;}

Property Value

true to automatically post to the server; otherwise, false. The default is true.

Remarks

Use this property to specify whether the state of the LiveControls.LiveCheckBoxColumn is posted back to the server when clicked (via callback or postback, depending on the value of ILiveCallbackHandler.EnableCallback).

See Also

LiveCheckBoxColumn Class | LiveCheckBoxColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxColumn.NonEditModeBehavior Property

Gets or sets a value indicating the behavior of the control when not in edit mode.

[Visual Basic]
Public Property NonEditModeBehavior As NonEditModeBehavior
[C#]
public NonEditModeBehavior NonEditModeBehavior {get; set;}

Property Value

One of the LiveControls.NonEditModeBehavior values. The default is DisabledCheckBox.

Remarks

Use this property to specify the behavior of the LiveControls.LiveCheckBoxColumn when it is not in edit mode. Options include DisabledCheckBox, EnabledCheckBox, and Text.

Exceptions

Exception Type | Condition
ArgumentException | The specified value is not one of the NonEditModeBehavior values.

See Also

LiveCheckBoxColumn Class | LiveCheckBoxColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxColumn Methods

The methods of the LiveCheckBoxColumn class are listed below. For a complete list of LiveCheckBoxColumn class members, see the LiveCheckBoxColumn Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from BoundColumn) | Resets the BoundColumn to its initial state.
InitializeCell | Resets the specified cell in the LiveCheckBoxColumn to its initial state.
ToString (inherited from DataGridColumn) |

Explicit Interface Implementations

IStateManager.LoadViewState (inherited from DataGridColumn)
IStateManager.SaveViewState (inherited from DataGridColumn)
IStateManager.TrackViewState (inherited from DataGridColumn)

See Also

LiveCheckBoxColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxColumn.InitializeCell Method

Resets the specified cell in the LiveCheckBoxColumn to its initial state.

[Visual Basic]
Overrides Public Sub InitializeCell( _
   ByVal cell As TableCell, _
   ByVal columnIndex As Integer, _
   ByVal itemType As ListItemType _
)
[C#]
public override void InitializeCell(
   TableCell cell,
   int columnIndex,
   ListItemType itemType
);

Parameters

cell
A TableCell object that represents the cell to reset.
columnIndex
The column number where the cell is located.
itemType
One of the ListItemType values.

Remarks

The InitializeCell method resets the specified cell in the LiveControls.LiveCheckBoxColumn to its initial state.

See Also

LiveCheckBoxColumn Class | LiveCheckBoxColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList Class

Creates a multi selection check box group that can be dynamically created by binding the control to a data source.

For a list of all members of this type, see LiveCheckBoxList Members.

System.Object
Control
WebControl
ListControl
CheckBoxList
LiveCheckBoxList

[Visual Basic]
Public Class LiveCheckBoxList
Inherits CheckBoxList
Implements ILiveControl, ILiveWebControl, ILiveCallbackHandler
[C#]
public class LiveCheckBoxList : CheckBoxList, ILiveControl, ILiveWebControl, ILiveCallbackHandler

Remarks

The LiveCheckBoxList control provides a multi selection check box group that can be dynamically generated with data binding. It contains an Items collection with members corresponding to individual items in the list. To determine which items are checked, iterate through the collection and test the ListBoxItem.Selected property of each item in the list.

You can specify the way the list is displayed by using the CheckBoxList.RepeatLayout and CheckBoxList.RepeatDirection properties. If CheckBoxList.RepeatLayout is set to RepeatLayout.Table (the default setting), the list is rendered within a table. If it is set to RepeatLayout.Flow, the list is rendered without any table structure. By default, CheckBoxList.RepeatDirection is set to RepeatDirection.Vertical. Setting this property to RepeatDirection.Horizontal renders the list horizontally.

The LiveCheckBoxList control provides convenient data binding capabilities. However, individual LiveControls.LiveCheckBox controls provide greater control over layout.

Example

[Visual Basic, C#] The following example demonstrates different ways of adding items to a Live List control.

[Visual Basic]
'In the following examples, items are added to all four types of Live List controls
'These include the LiveListBox, LiveDropDownList, LiveRadioButtonList and LiveCheckBoxList
'Each Live List control can be interchanged with another

'Add items using an ArrayList, and show a LiveMessageBox when an item is selected

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Create a new ArrayList with the items to add to the Live list control
    Dim arrayItems As New ArrayList()
    arrayItems.Add("Alert")
    arrayItems.Add("Confirm")
    arrayItems.Add("Prompt")

    'Set the data source to the ArrayList and bind it to the Live list control
    LiveRadioButtonList1.DataSource = arrayItems
    LiveRadioButtonList1.DataBind()
End Sub

Private Sub LiveRadioButtonList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveRadioButtonList1.SelectedIndexChanged
    'When a type of MessageBox is selected from the list, show it
    Select Case (LiveRadioButtonList1.SelectedIndex)
    Case 0
        LiveMessageBox1.Show("You have selected 'Alert'", DialogType.Alert)
        Case 1
        LiveMessageBox1.Show("You have selected 'Confirm'", DialogType.Confirm)
        Case 2
        LiveMessageBox1.Show("You have selected 'Prompt'", DialogType.Prompt)
        Case Else
    End Select
End Sub

Private Sub LiveMessageBox1_Response(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.ResponseEventArgs) Handles LiveMessageBox1.Response
    'After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    'If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    If (e.DialogType = DialogType.Confirm) Then
        If (e.Confirmed) Then
        LiveTextBox1.Text = "The OK button was pressed"
        Else
        LiveTextBox1.Text = "The Cancel button was pressed"
        End If

        'If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    ElseIf (e.DialogType = DialogType.Prompt) Then
        If (Not e.Confirmed) Then
        LiveTextBox1.Text = "The Prompt was cancelled"
        Else
        LiveTextBox1.Text = "The inputted data was: " + e.Text
        End If
    End If
End Sub

'Add items dynamically, when a LiveButton is pressed

Private Sub LiveButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton2.Click
    'Add items dynamically in code to a list control
    'When the LiveButton is pressed, a new item is added to the list
    LiveListBox1.Items.Add(DateTime.Now.ToString())
End Sub

Private Sub LiveListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveListBox1.SelectedIndexChanged
    'A LiveLabel is updated whenever an item is selected from the list
    LiveLabel1.Text = "This item was added at " + LiveListBox1.Items(LiveListBox1.SelectedIndex).ToString()
End Sub

'Add items from a database, and display an image when an item is selected

Private Sub LiveButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton3.Click
    'Make sure that System.Data.OleDb is used

    'Get Items from a Database "images.mdb" in the folder "database"
    'The table is called "Table1" and the column with the filenames is "filename"
    Dim connection As New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"))
    Dim sql As String = "SELECT filename FROM Table1"
    Dim adapter As New OleDbDataAdapter(sql, connection)
    Dim dataSet As New DataSet("imagesDataSet")
    adapter.Fill(dataSet, "images")

    'Bind the database to the Live List
    LiveDropDownList1.DataSource = dataSet
    LiveDropDownList1.DataMember = "images"
    LiveDropDownList1.DataTextField = "filename"
    LiveDropDownList1.DataBind()

    'Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveDropDownList1.SelectedIndex = 0
    LiveDropDownList1_SelectedIndexChanged(Me, Nothing)
End Sub

Private Sub LiveDropDownList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveDropDownList1.SelectedIndexChanged
    'The Live List has been populated with some image filenames
    'When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image."
    LiveImage1.ImageUrl = "images/" + LiveDropDownList1.SelectedItem.Text
End Sub

'Add items to the Items.Collection and play a sound when an item is selected

Private Sub LiveButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton4.Click
    'Add items to the Live list control via the ListItemCollection
    LiveCheckBoxList1.Items.Add("chord.wav")
    LiveCheckBoxList1.Items.Add("chimes.wav")
    LiveCheckBoxList1.Items.Add("exclamation.wav")
    LiveCheckBoxList1.Items.Add("error.wav")
End Sub

Private Sub LiveCheckBoxList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveCheckBoxList1.SelectedIndexChanged
    'When an item in the LiveCheckBoxList is selected or de-selected
    'The selected sound that is topmost in the list will play
    If (LiveCheckBoxList1.SelectedIndex > -1) Then
        LiveSound1.Source = "sounds/" + LiveCheckBoxList1.Items(LiveCheckBoxList1.SelectedIndex).ToString()
        LiveSound1.Play()
    End If
End Sub
                    [C#]
//In the following examples, items are added to all four types of Live List controls
//These include the LiveListBox, LiveDropDownList, LiveRadioButtonList and LiveCheckBoxList
//Each Live List control can be interchanged with another

//Add items using an ArrayList, and show a LiveMessageBox when an item is selected

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Create a new ArrayList with the items to add to the Live list control
    ArrayList arrayItems = new ArrayList();
    arrayItems.Add("Alert");
    arrayItems.Add("Confirm");
    arrayItems.Add("Prompt");

    //Set the data source to the ArrayList and bind it to the Live list control
    LiveRadioButtonList1.DataSource = arrayItems;
    LiveRadioButtonList1.DataBind();
}

private void LiveRadioButtonList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When a type of MessageBox is selected from the list, show it
    switch (LiveRadioButtonList1.SelectedIndex)
    {
        case 0:
            LiveMessageBox1.Show("You have selected 'Alert'!", DialogType.Alert);
            break;
        case 1:
            LiveMessageBox1.Show("You have selected 'Confirm'!", DialogType.Confirm);
            break;
        case 2:
            LiveMessageBox1.Show("You have selected 'Prompt'!", DialogType.Prompt);
            break;
        default:
            break;
    }
}

private void LiveMessageBox1_Response(object sender, Dart.PowerWEB.LiveControls.ResponseEventArgs e)
{
    //After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    //If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    if (e.DialogType == DialogType.Confirm)
    {
        if (e.Confirmed)
            LiveTextBox1.Text = "The OK button was pressed!";
        else
            LiveTextBox1.Text = "The Cancel button was pressed!";
    }
    //If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    else if (e.DialogType == DialogType.Prompt)
    {
        if (!e.Confirmed)
            LiveTextBox1.Text = "The Prompt was cancelled!";
        else
            LiveTextBox1.Text = "The inputted data was: " + e.Text;
    }
}

//Add items dynamically, when a LiveButton is pressed

private void LiveButton2_Click(object sender, System.EventArgs e)
{
    //Add items dynamically in code to a list control
    //When the LiveButton is pressed, a new item is added to the list
    LiveListBox1.Items.Add(DateTime.Now.ToString());
}

private void LiveListBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //A LiveLabel is updated whenever an item is selected from the list
    LiveLabel1.Text = "This item was added at " + LiveListBox1.Items[LiveListBox1.SelectedIndex];
}

//Add items from a database, and display an image when an item is selected

private void LiveButton3_Click(object sender, System.EventArgs e)
{
    //Make sure that System.Data.OleDb is used

    //Get Items from a Database "images.mdb" in the folder "database"
    //The table is called "Table1" and the column with the filenames is "filename"
    OleDbConnection connection = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"));
    string sql = "SELECT filename FROM Table1";
    OleDbDataAdapter adapter = new OleDbDataAdapter(sql, connection);
    DataSet dataSet = new DataSet("imagesDataSet");
    adapter.Fill(dataSet, "images");

    //Bind the database to the Live List
    LiveDropDownList1.DataSource = dataSet;
    LiveDropDownList1.DataMember = "images";
    LiveDropDownList1.DataTextField = "filename";
    LiveDropDownList1.DataBind();

    //Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveDropDownList1.SelectedIndex = 0;
    LiveDropDownList1_SelectedIndexChanged(this, null);
}

private void LiveDropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //The Live List has been populated with some image filenames
    //When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image.";
    LiveImage1.ImageUrl = "images/" + LiveDropDownList1.SelectedItem.Text;
}

//Add items to the Items.Collection and play a sound when an item is selected

private void LiveButton4_Click(object sender, System.EventArgs e)
{
    //Add items to the Live list control via the ListItemCollection
    LiveCheckBoxList1.Items.Add("chord.wav");
    LiveCheckBoxList1.Items.Add("chimes.wav");
    LiveCheckBoxList1.Items.Add("exclamation.wav");
    LiveCheckBoxList1.Items.Add("error.wav");
}

private void LiveCheckBoxList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When an item in the LiveCheckBoxList is selected or de-selected
    //The selected sound that is topmost in the list will play
    if (LiveCheckBoxList1.SelectedIndex > -1)
    {
        LiveSound1.Source = "sounds/" + LiveCheckBoxList1.Items[LiveCheckBoxList1.SelectedIndex];
        LiveSound1.Play();
    }
}

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList Members

Public Instance Constructors

LiveCheckBoxList Constructor Initializes a new instance of LiveCheckBoxList.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
CellPadding | Gets or sets the distance (in pixels) between the border and contents of the cell.
CellSpacing | Gets or sets the distance (in pixels) between cells.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataMember (inherited from ListControl) | Gets or sets the specific table in the DataSource to bind to the control.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
DataSource (inherited from ListControl) | Gets or sets the data source that populates the items of the list control.
DataTextField (inherited from ListControl) | Gets or sets the field of the data source that provides the text content of the list items.
DataTextFormatString (inherited from ListControl) | Gets or sets the formatting string used to control how data bound to the list control is displayed.
DataValueField (inherited from ListControl) | Gets or sets the field of the data source that provides the value of each list item.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Items (inherited from ListControl) | Gets the collection of items in the list control.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
RepeatColumns | Gets or sets the number of columns to display in the LiveControls.LiveCheckBoxList control.
RepeatDirection | Gets or sets a value that indicates whether the control displays vertically or horizontally.
RepeatLayout | Gets or sets the layout of the check boxes.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
SelectedIndex | Gets or sets the lowest ordinal index of the selected items in the list.
SelectedItem (inherited from ListControl) | Gets the selected item with the lowest index in the list control.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
TextAlign | Gets or sets the text alignment for the check boxes within the group.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
ClearSelection (inherited from ListControl) |
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
SelectedIndexChanged (inherited from ListControl) | Occurs when the selection on the list changes and is posted back to the server.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.
IRepeatInfoUser.GetItemStyle (inherited from CheckBoxList) |
IRepeatInfoUser.RenderItem (inherited from CheckBoxList) |

See Also

LiveCheckBoxList Class | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList Constructor

Initializes a new instance of LiveCheckBoxList.

[Visual Basic]
Public Sub New()
[C#]
public LiveCheckBoxList();

Remarks

The default constructor initializes a new instance of LiveCheckBoxList.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList Properties

The properties of the LiveCheckBoxList class are listed below. For a complete list of LiveCheckBoxList class members, see the LiveCheckBoxList Members topic.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
CellPadding | Gets or sets the distance (in pixels) between the border and contents of the cell.
CellSpacing | Gets or sets the distance (in pixels) between cells.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataMember (inherited from ListControl) | Gets or sets the specific table in the DataSource to bind to the control.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
DataSource (inherited from ListControl) | Gets or sets the data source that populates the items of the list control.
DataTextField (inherited from ListControl) | Gets or sets the field of the data source that provides the text content of the list items.
DataTextFormatString (inherited from ListControl) | Gets or sets the formatting string used to control how data bound to the list control is displayed.
DataValueField (inherited from ListControl) | Gets or sets the field of the data source that provides the value of each list item.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Items (inherited from ListControl) | Gets the collection of items in the list control.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
RepeatColumns | Gets or sets the number of columns to display in the LiveControls.LiveCheckBoxList control.
RepeatDirection | Gets or sets a value that indicates whether the control displays vertically or horizontally.
RepeatLayout | Gets or sets the layout of the check boxes.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
SelectedIndex | Gets or sets the lowest ordinal index of the selected items in the list.
SelectedItem (inherited from ListControl) | Gets the selected item with the lowest index in the list control.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
TextAlign | Gets or sets the text alignment for the check boxes within the group.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveCheckBoxList Class | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.AccessKey Property

Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.

[Visual Basic]
Overrides Public Property AccessKey As String
[C#]
public override string AccessKey {get; set;}

Property Value

The access key for quick navigation to the LiveControl. The default value is String.Empty, which indicates that this property is not set.

Remarks

Use the AccessKey property to specify the keyboard shortcut for the LiveControl. This allows you to navigate quickly to the control by pressing the ALT key and the key for the specified character on the keyboard. For example, setting the access key of a control to the string "D" indicates that the user can navigate to the control by pressing ALT+D.

Only a single character string is allowed for the AccessKey property. If you attempt to set this property to a value that is not a null reference (Nothing in Visual Basic), String.Empty, or a single character string, an exception is thrown.

Exceptions

Exception Type | Condition
ArgumentException | The specified access key is not either a null reference (Nothing in Visual Basic), String.Empty, or a single character string.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.AutoPostBack Property

Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.

[Visual Basic]
Overrides Public Property AutoPostBack As Boolean
[C#]
public override bool AutoPostBack {get; set;}

Property Value

true whenever the user changes the text in the text box and then tabs out of the control; otherwise, false. The default is true, which is different than the non-Live TextBox.

Remarks

For Live List Controls, set this property to true if the server needs to capture the change as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's selection from the list control. This property can be used to allow automatic population of other controls on the Web page based on a user's selection from the list.

For LiveCheckBox and LiveRadioButton, use this property to specify whether the state of the LiveControl is posted back to the server when clicked.

Note When AutoPostBack is true and ILiveCallbackHandler.EnableCallback is true, the LiveControl will perform automatic callbacks. If ILiveCallbackHandler.EnableCallback is false, traditional postbacks will occur.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.CellPadding Property

Gets or sets the distance (in pixels) between the border and contents of the cell.

[Visual Basic]
Overrides Public Property CellPadding As Integer
[C#]
public override int CellPadding {get; set;}

Property Value

The distance (in pixels) between the border and contents of the cell. The default is -1, which indicates this property is not set.

Remarks

Use this property to control the spacing between the contents of a cell and the cell's border in the LiveCheckBoxList control.

The padding amount specified is added to all four sides of a cell with the height of the tallest cell and width of the widest cell in the LiveCheckBoxList control. The resulting cell size is applied uniformly to all cells in the LiveCheckBoxList control.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.CellSpacing Property

Gets or sets the distance (in pixels) between cells.

[Visual Basic]
Overrides Public Property CellSpacing As Integer
[C#]
public override int CellSpacing {get; set;}

Property Value

The distance (in pixels) between cells. The default is -1, which indicates that this property is not set.

Remarks

Use this property to control the spacing between individual cells in the LiveCheckBoxList control. This property is applied both vertically and horizontally.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.RepeatColumns Property

Gets or sets the number of columns to display in the LiveControls.LiveCheckBoxList control.

[Visual Basic]
Overrides Public Property RepeatColumns As Integer
[C#]
public override int RepeatColumns {get; set;}

Property Value

The number of columns to display in the LiveControls.LiveCheckBoxList control. The default is 0, which indicates this property is not set.

Remarks

Use this property to specify the number of columns that display items in the LiveControls.LiveCheckBoxList control. If this property is not set, the LiveControls.LiveCheckBoxList control displays all list items in a single column.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The number of columns is set to a negative value.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.RepeatDirection Property

Gets or sets a value that indicates whether the control displays vertically or horizontally.

[Visual Basic]
Overrides Public Property RepeatDirection As RepeatDirection
[C#]
public override System.Web.UI.WebControls.RepeatDirection RepeatDirection {get; set;}

Property Value

One of the RepeatDirection values. The default is Vertical.

Remarks

Use this property to specify the display direction of the LiveControls.LiveCheckBoxList control.

Note The number of columns displayed is always determined by the LiveCheckBoxList.RepeatColumns property.

If this property is set to RepeatDirection.Vertical, the items in the list are displayed in columns loaded top to bottom, then left to right, until all items are rendered. For example, if the LiveCheckBoxList.RepeatColumns property is set to 3, the items in the LiveControls.LiveCheckBoxList control are displayed in three columns, as in the following table.

1 | 4 | 7
2 | 5 | 8
3 | 6 |

If this property is set to RepeatDirection.Horizontal, the items in the list are displayed in rows loaded left to right, then top to bottom, until all items are rendered. For example, if the LiveCheckBoxList.RepeatColumns property is set to 3, the items of the LiveControls.LiveCheckBoxList control are displayed in rows of three items each, as in the following table.

1 | 2 | 3
4 | 5 | 6
7 | 8 |

Exceptions

Exception Type | Condition
ArgumentException | The specified display direction of the list is not one of the RepeatDirection values.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.RepeatLayout Property

Gets or sets the layout of the check boxes.

[Visual Basic]
Overrides Public Property RepeatLayout As RepeatLayout
[C#]
public override System.Web.UI.WebControls.RepeatLayout RepeatLayout {get; set;}

Property Value

One of the RepeatLayout values. The default is Table.

Remarks

Use this property to specify whether the items in the LiveControls.LiveCheckBoxList control are displayed in a table. If this property is set to RepeatLayout.Table, the items in the list are displayed in a table. If this property is set to RepeatLayout.Flow, the items in the list are displayed without a table structure.

Exceptions

Exception Type | Condition
ArgumentException | The specified layout is not one of the RepeatLayout values.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.SelectedIndex Property

Gets or sets the lowest ordinal index of the selected items in the list.

[Visual Basic]
Overrides Public Property SelectedIndex As Integer
[C#]
public override int SelectedIndex {get; set;}

Property Value

The lowest ordinal index of the selected items in the list. The default is -1, which indicates that nothing is selected.

Remarks

Use this property to determine the index of the currently selected item in the list if the list control allows only one selection. If the list control supports multiple selections, use this property to determine the lowest index of the selected items.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The index was set to less than -1, or greater than or equal to the number of items on the list.

Example

[Visual Basic, C#] The following example demonstrates adding items to a Live List control from a database, as well as updating a LiveImage control.

[Visual Basic]
'In this example, items are added to a Live List using Items.Add
'The items are sounds to be played, located in a "sounds" folder
'When one of the items is selected, the corresponding sound is played
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Add items to the Live list control via the ListItemCollection
    LiveList1.Items.Add("chord.wav")
    LiveList1.Items.Add("chimes.wav")
    LiveList1.Items.Add("exclamation.wav")
    LiveList1.Items.Add("error.wav")
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveList1.SelectedIndexChanged
    'When an item in the LiveList is selected or de-selected
    'The selected sound that is topmost in the list will play
    If (LiveList1.SelectedIndex > -1) Then
        LiveSound1.Source = "sounds/" + LiveList1.Items(LiveList1.SelectedIndex).ToString()
        LiveSound1.Play()
    End If
End Sub
                    [C#]
//In this example, items are added to a Live List using Items.Add
//The items are sounds to be played, located in a "sounds" folder
//When one of the items is selected, the corresponding sound is played
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Add items to the Live List control via the ListItemCollection
    LiveList1.Items.Add("chord.wav");
    LiveList1.Items.Add("chimes.wav");
    LiveList1.Items.Add("exclamation.wav");
    LiveList1.Items.Add("error.wav");
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When an item in the Live List is selected or de-selected
    //The selected sound that is topmost in the list will play
    if (LiveList1.SelectedIndex > -1)
    {
        LiveSound1.Source = "sounds/" + LiveList1.Items[LiveList1.SelectedIndex];
        LiveSound1.Play();
    }
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.TextAlign Property

Gets or sets the text alignment for the check boxes within the group.

[Visual Basic]
Overrides Public Property TextAlign As TextAlign
[C#]
public override System.Web.UI.WebControls.TextAlign TextAlign {get; set;}

Property Value

One of the TextAlign values. The default value is Right.

Remarks

Use this property to specify whether the text associated with the check boxes appears on the left or right of the check box. If this property is set to TextAlign.Right, the text is displayed to the right of the check box. If this property is set to TextAlign.Left, the text is displayed to the left of the check box.

Exceptions

Exception Type | Condition
ArgumentException | The specified label text alignment is not one of the TextAlign values.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList Methods

The methods of the LiveCheckBoxList class are listed below. For a complete list of LiveCheckBoxList class members, see the LiveCheckBoxList Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
ClearSelection (inherited from ListControl) |
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.
IRepeatInfoUser.GetItemStyle (inherited from CheckBoxList) |
IRepeatInfoUser.RenderItem (inherited from CheckBoxList) |

See Also

LiveCheckBoxList Class | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.IPostBackDataHandler.LoadPostData Method

When implemented by a class, processes post back data for an ASP.NET server control.

[Visual Basic]
Function LoadPostData( _
   ByVal postDataKey As String, _
   ByVal postCollection As NameValueCollection _
) As Boolean Implements _
   IPostBackDataHandler.LoadPostData
[C#]
new bool IPostBackDataHandler.LoadPostData(
   string postDataKey,
   NameValueCollection postCollection
);

Parameters

postDataKey
The key identifier for the control.
postCollection
The collection of all incoming name values.

Implements

IPostBackDataHandler.LoadPostData

Remarks

The Web Forms page framework tracks all the server control's that return true to this method call, then invokes the IPostBackDataHandler.RaisePostDataChangedEvent on those controls.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.IPostBackDataHandler.RaisePostDataChangedEvent Method

When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

[Visual Basic]
Sub RaisePostDataChangedEvent() Implements _
   IPostBackDataHandler.RaisePostDataChangedEvent
[C#]
new void IPostBackDataHandler.RaisePostDataChangedEvent();

Implements

IPostBackDataHandler.RaisePostDataChangedEvent

Remarks

Change events for the server control that implements this interface, if any, are raised from this method.

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList Events

The events of the LiveCheckBoxList class are listed below. For a complete list of LiveCheckBoxList class members, see the LiveCheckBoxList Members topic.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
SelectedIndexChanged (inherited from ListControl) | Occurs when the selection on the list changes and is posted back to the server.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveCheckBoxList Class | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveCheckBoxList.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveCheckBoxList Class | LiveCheckBoxList Members | Dart.PowerWEB.LiveControls Namespace


LiveColumnEditorForm Class

Summary description for LiveColumnEditorForm.

For a list of all members of this type, see LiveColumnEditorForm Members.

System.Object
MarshalByRefObject
Component
Control
ScrollableControl
ContainerControl
Form
LiveColumnEditorForm

[Visual Basic]
Public Class LiveColumnEditorForm
Inherits Form
[C#]
public class LiveColumnEditorForm : Form

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveColumnEditorForm Members | Dart.PowerWEB.LiveControls Namespace


LiveColumnEditorForm Members

Public Instance Constructors

LiveColumnEditorForm Constructor

Public Instance Properties

AcceptButton (inherited from Form) | Gets or sets the button on the form that is clicked when the user presses the ENTER key.
AccessibilityObject (inherited from Control) | Gets the AccessibleObject assigned to the control.
AccessibleDefaultActionDescription (inherited from Control) | Gets or sets the default action description of the control for use by accessibility client applications.
AccessibleDescription (inherited from Control) | Gets or sets the description of the control used by accessibility client applications.
AccessibleName (inherited from Control) | Gets or sets the name of the control used by accessibility client applications.
AccessibleRole (inherited from Control) | Gets or sets the accessible role of the control
ActiveControl (inherited from ContainerControl) | Gets or sets the active control on the container control.
ActiveMdiChild (inherited from Form) | Gets the currently active multiple document interface (MDI) child window.
AllowDrop (inherited from Control) | Gets or sets a value indicating whether the control can accept data that the user drags onto it.
AllowTransparency (inherited from Form) |
Anchor (inherited from Control) | Gets or sets which edges of the control are anchored to the edges of its container.
AutoScale (inherited from Form) | Gets or sets a value indicating whether the form adjusts its size to fit the height of the font used on the form and scales its controls.
AutoScaleBaseSize (inherited from Form) | Gets or sets the base size used for autoscaling of the form.
AutoScroll (inherited from Form) | Gets or sets a value indicating whether the form enables autoscrolling.
AutoScrollMargin (inherited from ScrollableControl) | Gets or sets the size of the auto-scroll margin.
AutoScrollMinSize (inherited from ScrollableControl) | Gets or sets the minimum size of the auto-scroll.
AutoScrollPosition (inherited from ScrollableControl) | Gets or sets the location of the auto-scroll position.
BackColor (inherited from Form) |
BackgroundImage (inherited from Control) | Gets or sets the background image displayed in the control.
BindingContext (inherited from ContainerControl) |
Bottom (inherited from Control) | Gets the distance between the bottom edge of the control and the top edge of its container's client area.
Bounds (inherited from Control) | Gets or sets the size and location of the control.
CancelButton (inherited from Form) | Gets or sets the button control that is clicked when the user presses the ESC key.
CanFocus (inherited from Control) | Gets a value indicating whether the control can receive focus.
CanSelect (inherited from Control) | Gets a value indicating whether the control can be selected.
Capture (inherited from Control) | Gets or sets a value indicating whether the control has captured the mouse.
CausesValidation (inherited from Control) | Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.
ClientRectangle (inherited from Control) | Gets the rectangle that represents the client area of the control.
ClientSize (inherited from Form) | Gets or sets the size of the client area of the form.
CompanyName (inherited from Control) | Gets the name of the company or creator of the application containing the control.
Container (inherited from Component) | Gets the IContainer that contains the Component.
ContainsFocus (inherited from Control) | Gets a value indicating whether the control, or one of its child controls, currently has the input focus.
ContextMenu (inherited from Control) | Gets or sets the shortcut menu associated with the control.
ControlBox (inherited from Form) | Gets or sets a value indicating whether a control box is displayed in the caption bar of the form.
Controls (inherited from Control) | Gets the collection of controls contained within the control.
Created (inherited from Control) | Gets a value indicating whether the control has been created.
Cursor (inherited from Control) | Gets or sets the cursor that is displayed when the mouse pointer is over the control.
DataBindings (inherited from Control) | Gets the data bindings for the control.
DesktopBounds (inherited from Form) | Gets or sets the size and location of the form on the Windows desktop.
DesktopLocation (inherited from Form) | Gets or sets the location of the form on the Windows desktop.
DialogResult (inherited from Form) | Gets or sets the dialog result for the form.
DisplayRectangle (inherited from ScrollableControl) |
Disposing (inherited from Control) | Gets a value indicating whether the control is in the process of being disposed of.
Dock (inherited from Control) | Gets or sets which edge of the parent container a control is docked to.
DockPadding (inherited from ScrollableControl) | Gets the dock padding settings for all edges of the control.
Enabled (inherited from Control) | Gets or sets a value indicating whether the control can respond to user interaction.
Focused (inherited from Control) | Gets a value indicating whether the control has input focus.
Font (inherited from Control) | Gets or sets the font of the text displayed by the control.
ForeColor (inherited from Control) | Gets or sets the foreground color of the control.
FormBorderStyle (inherited from Form) | Gets or sets the border style of the form.
Handle (inherited from Control) | Gets the window handle that the control is bound to.
HasChildren (inherited from Control) | Gets a value indicating whether the control contains one or more child controls.
Height (inherited from Control) | Gets or sets the height of the control.
HelpButton (inherited from Form) | Gets or sets a value indicating whether a Help button should be displayed in the caption box of the form.
Icon (inherited from Form) | Gets or sets the icon for the form.
ImeMode (inherited from Control) | Gets or sets the Input Method Editor (IME) mode of the control.
InvokeRequired (inherited from Control) | Gets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on.
IsAccessible (inherited from Control) | Gets or sets a value indicating whether the control is visible to accessibility applications.
IsDisposed (inherited from Control) | Gets a value indicating whether the control has been disposed of.
IsHandleCreated (inherited from Control) | Gets a value indicating whether the control has a handle associated with it.
IsMdiChild (inherited from Form) | Gets a value indicating whether the form is a multiple document interface (MDI) child form.
IsMdiContainer (inherited from Form) | Gets or sets a value indicating whether the form is a container for multiple document interface (MDI) child forms.
IsRestrictedWindow (inherited from Form) |
KeyPreview (inherited from Form) | Gets or sets a value indicating whether the form will receive key events before the event is passed to the control that has focus.
Left (inherited from Control) | Gets or sets the x-coordinate of a control's left edge in pixels.
Location (inherited from Control) | Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.
MaximizeBox (inherited from Form) | Gets or sets a value indicating whether the maximize button is displayed in the caption bar of the form.
MaximumSize (inherited from Form) | Gets the maximum size the form can be resized to.
MdiChildren (inherited from Form) | Gets an array of forms that represent the multiple document interface (MDI) child forms that are parented to this form.
MdiParent (inherited from Form) | Gets or sets the current multiple document interface (MDI) parent form of this form.
Menu (inherited from Form) | Gets or sets the MainMenu that is displayed in the form.
MergedMenu (inherited from Form) | Gets the merged menu for the form.
MinimizeBox (inherited from Form) | Gets or sets a value indicating whether the minimize button is displayed in the caption bar of the form.
MinimumSize (inherited from Form) | Gets or sets the minimum size the form can be resized to.
Modal (inherited from Form) | Gets a value indicating whether this form is displayed modally.
Name (inherited from Control) | Gets or sets the name of the control.
Opacity (inherited from Form) | Gets or sets the opacity level of the form.
OwnedForms (inherited from Form) | Gets an array of Form objects that represent all forms that are owned by this form.
Owner (inherited from Form) | Gets or sets the form that owns this form.
Parent (inherited from Control) | Gets or sets the parent container of the control.
ParentForm (inherited from ContainerControl) | Gets the form that the container control is assigned to.
ProductName (inherited from Control) | Gets the product name of the assembly containing the control.
ProductVersion (inherited from Control) | Gets the version of the assembly containing the control.
RecreatingHandle (inherited from Control) | Gets a value indicating whether the control is currently re-creating its handle.
Region (inherited from Control) | Gets or sets the window region associated with the control.
Right (inherited from Control) | Gets the distance between the right edge of the control and the left edge of its container.
RightToLeft (inherited from Control) | Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.
ShowInTaskbar (inherited from Form) | Gets or sets a value indicating whether the form is displayed in the Windows taskbar.
Site (inherited from Control) | Gets or sets the site of the control.
Size (inherited from Form) | Gets or sets the size of the form.
SizeGripStyle (inherited from Form) | Gets or sets the style of the size grip to display in the lower-right corner of the form.
StartPosition (inherited from Form) | Gets or sets the starting position of the form at run time.
TabIndex (inherited from Form) |
TabStop (inherited from Control) | Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.
Tag (inherited from Control) | Gets or sets the object that contains data about the control.
Text (inherited from Control) | Gets or sets the text associated with this control.
Top (inherited from Control) | Gets or sets the y-coordinate of the control's top edge in pixels.
TopLevel (inherited from Form) | Gets or sets a value indicating whether to display the form as a top-level window.
TopLevelControl (inherited from Control) | Gets the parent control that is not parented by another Windows Forms control. Typically, this is the outermost Form that the control is contained in.
TopMost (inherited from Form) | Gets or sets a value indicating whether the form should be displayed as the top-most form of your application.
TransparencyKey (inherited from Form) | Gets or sets the color that will represent transparent areas of the form.
Visible (inherited from Control) | Gets or sets a value indicating whether the control is displayed.
Width (inherited from Control) | Gets or sets the width of the control.
WindowState (inherited from Form) | Gets or sets the form's window state.
WindowTarget (inherited from Control) |

Public Instance Methods

Activate (inherited from Form) | Activates the form and gives it focus.
AddOwnedForm (inherited from Form) | Adds an owned form to this form.
BeginInvoke (inherited from Control) | Executes the specified delegate asynchronously with the specified arguments, on the thread that the control's underlying handle was created on.
BeginInvoke (inherited from Control) | Executes the specified delegate asynchronously on the thread that the control's underlying handle was created on.
BringToFront (inherited from Control) | Brings the control to the front of the z-order.
Close (inherited from Form) | Closes the form.
Contains (inherited from Control) | Retrieves a value indicating whether the specified control is a child of the control.
CreateControl (inherited from Control) | Forces the creation of the control, including the creation of the handle and any child controls.
CreateGraphics (inherited from Control) | Creates the Graphics object for the control.
CreateObjRef (inherited from MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Dispose (inherited from Component) | Releases all resources used by the Component.
DoDragDrop (inherited from Control) | Begins a drag-and-drop operation.
EndInvoke (inherited from Control) | Retrieves the return value of the asynchronous operation represented by the IAsyncResult object passed.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindForm (inherited from Control) | Retrieves the form that the control is on.
Focus (inherited from Control) | Sets input focus to the control.
GetChildAtPoint (inherited from Control) | Retrieves the child control that is located at the specified coordinates.
GetContainerControl (inherited from Control) | Returns the next ContainerControl up the control's chain of parent controls.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetLifetimeService (inherited from MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
GetNextControl (inherited from Control) | Retrieves the next control forward or back in the tab order of child controls.
GetType (inherited from Object) | Gets the Type of the current instance.
Hide (inherited from Control) | Conceals the control from the user.
InitializeLifetimeService (inherited from MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Invalidate (inherited from Control) | Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.
Invalidate (inherited from Control) | Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.
Invalidate (inherited from Control) | Invalidates a specific region of the control and causes a paint message to be sent to the control.
Invalidate (inherited from Control) | Invalidates a specific region of the control and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.
Invalidate (inherited from Control) | Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.
Invalidate (inherited from Control) | Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.
Invoke (inherited from Control) | Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments.
Invoke (inherited from Control) | Executes the specified delegate on the thread that owns the control's underlying window handle.
LayoutMdi (inherited from Form) | Arranges the multiple document interface (MDI) child forms within the MDI parent form.
PerformLayout (inherited from Control) | Forces the control to apply layout logic to all its child controls.
PerformLayout (inherited from Control) | Forces the control to apply layout logic to all its child controls.
PointToClient (inherited from Control) | Computes the location of the specified screen point into client coordinates.
PointToScreen (inherited from Control) | Computes the location of the specified client point into screen coordinates.
PreProcessMessage (inherited from Control) | Preprocesses input messages within the message loop before they are dispatched.
RectangleToClient (inherited from Control) | Computes the size and location of the specified screen rectangle in client coordinates.
RectangleToScreen (inherited from Control) | Computes the size and location of the specified client rectangle in screen coordinates.
Refresh (inherited from Control) | Forces the control to invalidate its client area and immediately redraw itself and any child controls.
RemoveOwnedForm (inherited from Form) | Removes an owned form from this form.
ResetBackColor (inherited from Control) | Resets the BackColor property to its default value.
ResetBindings (inherited from Control) | Resets the DataBindings property to its default value.
ResetCursor (inherited from Control) | Resets the Cursor property to its default value.
ResetFont (inherited from Control) | Resets the Fontproperty to its default value.
ResetForeColor (inherited from Control) | Resets the ForeColor property to its default value.
ResetImeMode (inherited from Control) | Resets the ImeMode property to its default value.
ResetRightToLeft (inherited from Control) | Resets the RightToLeft property to its default value.
ResetText (inherited from Control) | Resets the Text property to its default value.
ResumeLayout (inherited from Control) | Resumes normal layout logic.
ResumeLayout (inherited from Control) | Resumes normal layout logic. Optionally forces an immediate layout of pending layout requests.
Scale (inherited from Control) | Scales the control and any child controls to the specified ratio.
Scale (inherited from Control) | Scales the control and any child controls by the specified horizontal and vertical ratios.
ScrollControlIntoView (inherited from ScrollableControl) |
Select (inherited from Control) | Activates the control.
SelectNextControl (inherited from Control) | Activates the next control.
SendToBack (inherited from Control) | Sends the control to the back of the z-order.
SetAutoScrollMargin (inherited from ScrollableControl) | Sets the size of the auto-scroll margins.
SetBounds (inherited from Control) | Sets the bounds of the control to the specified location and size.
SetBounds (inherited from Control) | Sets the specified bounds of the control to the specified location and size.
SetDesktopBounds (inherited from Form) | Sets the bounds of the form in desktop coordinates.
SetDesktopLocation (inherited from Form) | Sets the location of the form in desktop coordinates.
Show (inherited from Control) | Displays the control to the user.
ShowDialog (inherited from Form) | Shows the form as a modal dialog box with no owner window.
ShowDialog (inherited from Form) | Shows the form as a modal dialog with the specified owner.
SuspendLayout (inherited from Control) | Temporarily suspends the layout logic for the control.
ToString (inherited from Form) |
Update (inherited from Control) | Causes the control to redraw the invalidated regions with its client area.
Validate (inherited from ContainerControl) | Validates the last invalidated control and its ancestors up through, but not including, the current control.

Public Instance Events

Activated (inherited from Form) | Occurs when the form is activated in code or by the user.
BackColorChanged (inherited from Control) | Occurs when the value of the BackColor property changes.
BackgroundImageChanged (inherited from Control) | Occurs when the value of the BackgroundImage property changes.
BindingContextChanged (inherited from Control) | Occurs when the value of the BindingContext property changes.
CausesValidationChanged (inherited from Control) | Occurs when the value of the CausesValidation property changes.
ChangeUICues (inherited from Control) | Occurs when the focus or keyboard user interface (UI) cues change.
Click (inherited from Control) | Occurs when the control is clicked.
Closed (inherited from Form) | Occurs when the form is closed.
Closing (inherited from Form) | Occurs when the form is closing.
ContextMenuChanged (inherited from Control) | Occurs when the value of the ContextMenu property changes.
ControlAdded (inherited from Control) | Occurs when a new control is added to the ControlCollection .
ControlRemoved (inherited from Control) | Occurs when a control is removed from the ControlCollection .
CursorChanged (inherited from Control) | Occurs when the value of the Cursor property changes.
Deactivate (inherited from Form) | Occurs when the form loses focus and is not the active form.
Disposed (inherited from Component) | Adds an event handler to listen to the Disposed event on the component.
DockChanged (inherited from Control) | Occurs when the value of the Dock property changes.
DoubleClick (inherited from Control) | Occurs when the control is double-clicked.
DragDrop (inherited from Control) | Occurs when a drag-and-drop operation is completed.
DragEnter (inherited from Control) | Occurs when an object is dragged into the control's bounds.
DragLeave (inherited from Control) | Occurs when an object is dragged out of the control's bounds.
DragOver (inherited from Control) | Occurs when an object is dragged over the control's bounds.
EnabledChanged (inherited from Control) | Occurs when the Enabled property value has changed.
Enter (inherited from Control) | Occurs when the control is entered.
FontChanged (inherited from Control) | Occurs when the Font property value changes.
ForeColorChanged (inherited from Control) | Occurs when the ForeColor property value changes.
GiveFeedback (inherited from Control) | Occurs during a drag operation.
GotFocus (inherited from Control) | Occurs when the control receives focus.
HandleCreated (inherited from Control) | Occurs when a handle is created for the control.
HandleDestroyed (inherited from Control) | Occurs when the control's handle is in the process of being destroyed.
HelpRequested (inherited from Control) | Occurs when the user requests help for a control.
ImeModeChanged (inherited from Control) | Occurs when the ImeMode property has changed.
InputLanguageChanged (inherited from Form) | Occurs after the input language of the form has changed.
InputLanguageChanging (inherited from Form) | Occurs when the user attempts to change the input language for the form.
Invalidated (inherited from Control) | Occurs when a control's display requires redrawing.
KeyDown (inherited from Control) | Occurs when a key is pressed while the control has focus.
KeyPress (inherited from Control) | Occurs when a key is pressed while the control has focus.
KeyUp (inherited from Control) | Occurs when a key is released while the control has focus.
Layout (inherited from Control) | Occurs when a control should reposition its child controls.
Leave (inherited from Control) | Occurs when the input focus leaves the control.
Load (inherited from Form) | Occurs before a form is displayed for the first time.
LocationChanged (inherited from Control) | Occurs when the Location property value has changed.
LostFocus (inherited from Control) | Occurs when the control loses focus.
MaximizedBoundsChanged (inherited from Form) | Occurs when the value of the MaximizedBounds property has changed.
MaximumSizeChanged (inherited from Form) | Occurs when the value of the MaximumSize property has changed.
MdiChildActivate (inherited from Form) | Occurs when a multiple document interface (MDI) child form is activated or closed within an MDI application.
MenuComplete (inherited from Form) | Occurs when the menu of a form loses focus.
MenuStart (inherited from Form) | Occurs when the menu of a form receives focus.
MinimumSizeChanged (inherited from Form) | Occurs when the value of the MinimumSize property has changed.
MouseDown (inherited from Control) | Occurs when the mouse pointer is over the control and a mouse button is pressed.
MouseEnter (inherited from Control) | Occurs when the mouse pointer enters the control.
MouseHover (inherited from Control) | Occurs when the mouse pointer hovers over the control.
MouseLeave (inherited from Control) | Occurs when the mouse pointer leaves the control.
MouseMove (inherited from Control) | Occurs when the mouse pointer is moved over the control.
MouseUp (inherited from Control) | Occurs when the mouse pointer is over the control and a mouse button is released.
MouseWheel (inherited from Control) | Occurs when the mouse wheel moves while the control has focus.
Move (inherited from Control) | Occurs when the control is moved.
Paint (inherited from Control) | Occurs when the control is redrawn.
ParentChanged (inherited from Control) | Occurs when the Parent property value changes.
QueryAccessibilityHelp (inherited from Control) | Occurs when AccessibleObject is providing help to accessibility applications.
QueryContinueDrag (inherited from Control) | Occurs during a drag-and-drop operation and allows the drag source to determine whether the drag-and-drop operation should be canceled.
Resize (inherited from Control) | Occurs when the control is resized.
RightToLeftChanged (inherited from Control) | Occurs when the RightToLeft property value changes.
SizeChanged (inherited from Control) | Occurs when the Size property value changes.
StyleChanged (inherited from Control) | Occurs when the control style changes.
SystemColorsChanged (inherited from Control) | Occurs when the system colors change.
TabIndexChanged (inherited from Control) | Occurs when the TabIndex property value changes.
TabStopChanged (inherited from Control) | Occurs when the TabStop property value changes.
TextChanged (inherited from Control) | Occurs when the Text property value changes.
Validated (inherited from Control) | Occurs when the control is finished validating.
Validating (inherited from Control) | Occurs when the control is validating.
VisibleChanged (inherited from Control) | Occurs when the Visible property value changes.

Explicit Interface Implementations

IContainerControl.ActivateControl (inherited from ContainerControl)

See Also

LiveColumnEditorForm Class | Dart.PowerWEB.LiveControls Namespace


LiveColumnEditorForm Constructor

[Visual Basic]
Public Sub New( _
   ByVal grid As LiveDataGrid _
)
[C#]
public LiveColumnEditorForm(
   LiveDataGrid grid
);

Parameters

grid

See Also

LiveColumnEditorForm Class | LiveColumnEditorForm Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid Class

A data bound list control that displays the items from data source in a table. The LiveDataGrid control allows you to select, sort, and edit these items.

For a list of all members of this type, see LiveDataGrid Members.

System.Object
Control
WebControl
BaseDataList
DataGrid
LiveDataGrid

[Visual Basic]
Public Class LiveDataGrid
Inherits DataGrid
Implements ILiveControl, ILiveWebControl, IPostBackEventHandler, ILiveCallbackHandler
[C#]
public class LiveDataGrid : DataGrid, ILiveControl, ILiveWebControl, IPostBackEventHandler, ILiveCallbackHandler

Remarks

Use the LiveDataGrid control to display the fields of a data source as columns in a table. Each row in the LiveDataGrid control represents a record in the data source. The LiveDataGrid control supports selection, editing, deleting, paging, and sorting.

Different column types determine the behavior of the columns in the control. The following table lists the different column types that can be used.

Column Type | Description
LiveBoundColumn | Displays a column bound to a field in a data source. It displays each item in the field as text. This type of column is Live enabled.
LiveButtonColumn | Displays a command button for each item in the column. This allows you to create a column of custom button controls, such as Add or Remove buttons. This type of column is Live enabled.
LiveCheckBoxColumn | Displays a check box for each item in the column. This type of column is Live enabled.
LiveDropDownListColumn | Displays a dropdown list for each item in the column. This type of column is Live enabled.
LiveRadioButtonColumn | Displays a radio button for each item in the column. This type of column is Live enabled.
BoundColumn | Displays a column bound to a field in a data source. It displays each item in the field as text.
ButtonColumn | Displays a command button for each item in the column. This allows you to create a column of custom button controls, such as Add or Remove buttons.
EditCommandColumn | Displays a column that contains editing commands for each item in the column.
HyperLinkColumn | Displays the contents of each item in the column as a hyperlink. The contents of the column can be bound to a field in a data source or static text.
TemplateColumn | Displays each item in the column following a specified template. This allows you to provide custom controls in the column.

By default, the AutoGenerateColumns property is set to true, which creates a LiveBoundColumn object for each field in the data source. Each field is then rendered as a column in the LiveDataGrid control in the order that each field appears in the data source.

You can also manually control which columns appear in the LiveDataGrid control by setting the AutoGenerateColumns property to false and then listing the columns that you want to include between the opening and closing <Columns> tags. The columns specified are added to the Columns collection in the order listed. This allows you to programmatically control the columns in the LiveDataGrid control.

Note The order that the columns are displayed in the LiveDataGrid control is controlled by the order that the columns appear in the Columns collection. Although you can programmatically change the order of the columns by manipulating the Columns collection, it is easier to list the columns in the desired display order.

Explicitly declared columns can be displayed in conjunction with automatically generated columns. When using both, explicitly declared columns will be rendered first, followed by the automatically generated columns.

Note Automatically generated columns are not added to the Columns collection.

The appearance of the LiveDataGrid control may be customized by setting the style properties for the different parts of the control. The following table lists the different style properties.

Style Property | Description
AlternatingItemStyle | Specifies the style for alternating items in the LiveDataGrid control.
EditItemStyle | Specifies the style for the item being edited in the LiveDataGrid control.
FooterStyle | Specifies the style for the footer section in the LiveDataGrid control.
HeaderStyle | Specifies the style for the header section in the LiveDataGrid control.
ItemStyle | Specifies the style for the items in the LiveDataGrid control.
PagerStyle | Specifies the style for the page selection section of the LiveDataGrid control.
SelectedItemStyle | Specifies the style for the selected item in the LiveDataGrid control.

You can also show or hide different parts of the control. The following table lists the properties that control which parts are shown or hidden.

Property | Description
ShowFooter | Shows or hides the footer section of the LiveDataGrid control.
ShowHeader | Shows or hides the header section of the LiveDataGrid control.

You can control the appearance of the LiveDataGrid control by programmatically adding attributes to the <td> and <tr> tags rendered by the control on the browser. Attributes can be programmatically added by providing code in the event handler for the OnItemCreated or OnItemDataBound event.

To add an attribute to the <td> tag, first get the TableCell object that represents the cell in the LiveDataGrid control you want to add the attribute to. The Controls collection for the Item property of the DataGridItemEventArgs object passed into the event handler can be used to get the desired TableCell object. You can then use the AttributeCollection.Add method of the Attributes collection for the TableCell object to add attributes to the <td> tag.

To add an attribute to the <tr> tag, first get the DataGridItem object that represents the row in the LiveDataGrid control you want to add the attribute to. The Item property of the DataGridItemEventArgs object passed into the event handler can be used to get the desired DataGridItem object. You can then use the AttributeCollection.Add method of the Attributes collection for the DataGridItem object to add attributes to the <tr> tag.

For LiveDataGrid examples, see the topic Walkthrough: Using the LiveGrid Control.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid Members

Public Instance Constructors

LiveDataGrid Constructor Initializes a new instance of LiveGrid.

Public Instance Properties

AccessKey (inherited from WebControl) | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the Web server control.
AllowCustomPaging (inherited from DataGrid) | Gets or sets a value that indicates whether custom paging is enabled.
AllowPaging (inherited from DataGrid) | Gets or sets a value that indicates whether paging is enabled.
AllowSorting (inherited from DataGrid) | Gets or sets a value that indicates whether sorting is enabled.
AlternatingItemStyle (inherited from DataGrid) | Gets the style properties for alternating items in the DataGrid control.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoGenerateColumns (inherited from DataGrid) | Gets or sets a value that indicates whether BoundColumn objects are automatically created and displayed in the DataGrid control for each field in the data source.
BackColor | Gets or sets the background color of the LiveControl.
BackImageUrl | Gets or sets the URL of an image to display in the background of the LiveControls.LiveDataGrid control.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
CellPadding | Gets or sets the amount of space between the contents of a cell and the cell's border.
CellSpacing | Gets or sets the amount of space between cells.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Columns | Gets a collection of objects that represent the columns of the LiveControls.LiveDataGrid control.
Controls (inherited from BaseDataList) | Gets a ControlCollection that contains a collection of child controls in a data listing control.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
ControlViewState | Gets a dictionary of state information that allows you to save and restore the view state of the LiveControls.LiveDataGrid across multiple requests for the same page.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
CurrentPageIndex (inherited from DataGrid) | Gets or sets the index of the currently displayed page.
DataKeyField (inherited from BaseDataList) | Gets or sets the key field in the data source specified by the DataSource property.
DataKeys (inherited from BaseDataList) | Gets a DataKeyCollection that stores the key values of each record (displayed as a row) in a data listing control.
DataMember (inherited from BaseDataList) | Gets or sets the specific data member in a multimember data source to bind to a data listing control.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
DataSource (inherited from BaseDataList) | Gets or sets the source containing a list of values used to populate the items within the control.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EditItemIndex | Gets or sets the index of an item in the LiveControls.LiveDataGrid control to edit.
EditItemStyle (inherited from DataGrid) | Gets the style properties of the item selected for editing in the DataGrid control.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
FooterStyle (inherited from DataGrid) | Gets the style properties of the footer section in the DataGrid control.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
GridLines | Gets or sets a value that specifies whether the border between the cells of a data listing control is displayed.
HeaderStyle (inherited from DataGrid) | Gets the style properties of the heading section in the DataGrid control.
Height | Gets or sets the height of the LiveControl.
HorizontalAlign | Gets or sets the horizontal alignment of a data listing control within its container.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Items (inherited from DataGrid) | Gets a collection of DataGridItem objects that represent the individual items in the DataGrid control.
ItemStyle (inherited from DataGrid) | Gets the style properties of the items in the DataGrid control.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
PageCount (inherited from DataGrid) | Gets the total number of pages required to display the items in the DataGrid control.
PagerStyle (inherited from DataGrid) | Gets the style properties of the paging section of the DataGrid control.
PageSize (inherited from DataGrid) | Gets or sets the number of items to display on a single page of the DataGrid control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
SelectedIndex | Gets or sets the index of the selected item in the LiveControls.LiveDataGrid control.
SelectedItem (inherited from DataGrid) | Gets a DataGridItem object that represents the selected item in the DataGrid control.
SelectedItemStyle (inherited from DataGrid) | Gets the style properties of the currently selected item in the DataGrid control.
ShowFooter (inherited from DataGrid) | Gets or sets a value that indicates whether the footer is displayed in the DataGrid control.
ShowHeader (inherited from DataGrid) | Gets or sets a value that indicates whether the header is displayed in the DataGrid control.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
VirtualItemCount (inherited from DataGrid) | Gets or sets the virtual number of items in the DataGrid control when custom paging is used.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind | Binds the control and all its child controls to the data source specified by the BaseDataList.DataSource property.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

CancelCommand (inherited from DataGrid) | Occurs when the Cancel button is clicked for an item in the DataGrid control.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
DeleteCommand (inherited from DataGrid) | Occurs when the Delete button is clicked for an item in the DataGrid control.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
EditCommand (inherited from DataGrid) | Occurs when the Edit button is clicked for an item in the DataGrid control.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
ItemCommand (inherited from DataGrid) | Occurs when any button is clicked in the DataGrid control.
ItemCreated (inherited from DataGrid) | Occurs on the server when an item in the DataGrid control is created.
ItemDataBound (inherited from DataGrid) | Occurs after an item is data bound to the DataGrid control.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PageIndexChanged (inherited from DataGrid) | Occurs when one of the page selection elements is clicked.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
SelectedIndexChanged (inherited from BaseDataList) | Occurs when a different item is selected in a data listing control between posts to the server.
SortCommand (inherited from DataGrid) | Occurs when a column is sorted.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.
UpdateCommand (inherited from DataGrid) | Occurs when the Update button is clicked for an item in the DataGrid control.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveDataGrid Class | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid Constructor

Initializes a new instance of LiveGrid.

[Visual Basic]
Public Sub New()
[C#]
public LiveDataGrid();

Remarks

The default constructor initializes a new instance of LiveGrid.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid Properties

The properties of the LiveDataGrid class are listed below. For a complete list of LiveDataGrid class members, see the LiveDataGrid Members topic.

Public Instance Properties

AccessKey (inherited from WebControl) | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the Web server control.
AllowCustomPaging (inherited from DataGrid) | Gets or sets a value that indicates whether custom paging is enabled.
AllowPaging (inherited from DataGrid) | Gets or sets a value that indicates whether paging is enabled.
AllowSorting (inherited from DataGrid) | Gets or sets a value that indicates whether sorting is enabled.
AlternatingItemStyle (inherited from DataGrid) | Gets the style properties for alternating items in the DataGrid control.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoGenerateColumns (inherited from DataGrid) | Gets or sets a value that indicates whether BoundColumn objects are automatically created and displayed in the DataGrid control for each field in the data source.
BackColor | Gets or sets the background color of the LiveControl.
BackImageUrl | Gets or sets the URL of an image to display in the background of the LiveControls.LiveDataGrid control.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
CellPadding | Gets or sets the amount of space between the contents of a cell and the cell's border.
CellSpacing | Gets or sets the amount of space between cells.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Columns | Gets a collection of objects that represent the columns of the LiveControls.LiveDataGrid control.
Controls (inherited from BaseDataList) | Gets a ControlCollection that contains a collection of child controls in a data listing control.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
ControlViewState | Gets a dictionary of state information that allows you to save and restore the view state of the LiveControls.LiveDataGrid across multiple requests for the same page.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
CurrentPageIndex (inherited from DataGrid) | Gets or sets the index of the currently displayed page.
DataKeyField (inherited from BaseDataList) | Gets or sets the key field in the data source specified by the DataSource property.
DataKeys (inherited from BaseDataList) | Gets a DataKeyCollection that stores the key values of each record (displayed as a row) in a data listing control.
DataMember (inherited from BaseDataList) | Gets or sets the specific data member in a multimember data source to bind to a data listing control.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
DataSource (inherited from BaseDataList) | Gets or sets the source containing a list of values used to populate the items within the control.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EditItemIndex | Gets or sets the index of an item in the LiveControls.LiveDataGrid control to edit.
EditItemStyle (inherited from DataGrid) | Gets the style properties of the item selected for editing in the DataGrid control.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
FooterStyle (inherited from DataGrid) | Gets the style properties of the footer section in the DataGrid control.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
GridLines | Gets or sets a value that specifies whether the border between the cells of a data listing control is displayed.
HeaderStyle (inherited from DataGrid) | Gets the style properties of the heading section in the DataGrid control.
Height | Gets or sets the height of the LiveControl.
HorizontalAlign | Gets or sets the horizontal alignment of a data listing control within its container.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Items (inherited from DataGrid) | Gets a collection of DataGridItem objects that represent the individual items in the DataGrid control.
ItemStyle (inherited from DataGrid) | Gets the style properties of the items in the DataGrid control.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
PageCount (inherited from DataGrid) | Gets the total number of pages required to display the items in the DataGrid control.
PagerStyle (inherited from DataGrid) | Gets the style properties of the paging section of the DataGrid control.
PageSize (inherited from DataGrid) | Gets or sets the number of items to display on a single page of the DataGrid control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
SelectedIndex | Gets or sets the index of the selected item in the LiveControls.LiveDataGrid control.
SelectedItem (inherited from DataGrid) | Gets a DataGridItem object that represents the selected item in the DataGrid control.
SelectedItemStyle (inherited from DataGrid) | Gets the style properties of the currently selected item in the DataGrid control.
ShowFooter (inherited from DataGrid) | Gets or sets a value that indicates whether the footer is displayed in the DataGrid control.
ShowHeader (inherited from DataGrid) | Gets or sets a value that indicates whether the header is displayed in the DataGrid control.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
VirtualItemCount (inherited from DataGrid) | Gets or sets the virtual number of items in the DataGrid control when custom paging is used.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveDataGrid Class | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.BackImageUrl Property

Gets or sets the URL of an image to display in the background of the LiveControls.LiveDataGrid control.

[Visual Basic]
Overrides Public Property BackImageUrl As String
[C#]
public override string BackImageUrl {get; set;}

Property Value

The URL of an image to display in the background of the LiveControls.LiveDataGrid control. The default value is String.Empty.

Remarks

Use the BackImageUrl property to specify an image to display in the background of the LiveDataGrid control.

Note If the specified image is smaller than the LiveControls.LiveDataGrid control, the image will tile to fill in the background of the control.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.CellPadding Property

Gets or sets the amount of space between the contents of a cell and the cell's border.

[Visual Basic]
Overrides Public Property CellPadding As Integer
[C#]
public override int CellPadding {get; set;}

Property Value

The amount of space (in pixels) between the contents of a cell and the cell's border. The default value is -1, which indicates that this property is not set.

Remarks

Use the CellPadding property to control the spacing between the contents of a cell and the cell's border. The padding amount specified is added to all four sides of the cell.

All cells in the same column of a data listing control share the same cell width. Therefore, if the content of one cell is longer than the content other cells in the same column, the padding amount is applied to the widest cell. All other cells in the column are also set with this cell width.

Similarly, all cells in the same row share the same height. The padding amount is applied to the height of the tallest cell in the row. All other cells in the row are set with this cell height. Individual cell sizes cannot be specified.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.CellSpacing Property

Gets or sets the amount of space between cells.

[Visual Basic]
Overrides Public Property CellSpacing As Integer
[C#]
public override int CellSpacing {get; set;}

Property Value

The amount of space (in pixels) between cells. The default value is 0.

Remarks

Use the CellSpacing property to control the spacing between adjacent cells in a data listing control. This spacing is applied both vertically and horizontally. The cell spacing is uniform for the entire data listing control. Individual cell spacing between each row or column cannot be specified.

Note If you set this property to a value greater than 0 and set the GridLines property to a value that displays the cell borders, a gap is displayed between the borders of adjacent cells. In this situation, the CellSpacing property controls the size of the gap.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.Columns Property

Gets a collection of objects that represent the columns of the LiveControls.LiveDataGrid control.

[Visual Basic]
Overrides Public ReadOnly Property Columns As DataGridColumnCollection
[C#]
public override System.Web.UI.WebControls.DataGridColumnCollection Columns {get;}

Property Value

A WebControls.DataGridColumnCollection object that contains a collection of objects that represent the columns of the LiveControls.LiveDataGrid control.

Remarks

Use this property to programmatically control the collection of columns in the LiveControls.LiveDataGrid control. The Columns collection contains explicitly declared columns that get rendered in the LiveControls.LiveDataGrid control.

Note Explicitly declared columns may be used in conjunction with automatically generated columns. When using both, explicitly declared columns will be rendered first, followed by the automatically generated columns. Automatically generated columns are not added to the Columns collection.

The order that the columns are displayed in the LiveControls.LiveDataGrid control is controlled by the order that the columns appear in the Columns collection.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.ControlViewState Property

Gets a dictionary of state information that allows you to save and restore the view state of the LiveControls.LiveDataGrid across multiple requests for the same page.

[Visual Basic]
Public ReadOnly Property ControlViewState As StateBag
[C#]
public System.Web.UI.StateBag ControlViewState {get;}

Property Value

An instance of the StateBag class that contains the LiveControls.LiveDataGrid's view-state information.

Remarks

The LiveControls.LiveDataGrid's view state is the accumulation of all its property values. In order to preserve these values across HTTP requests, the LiveControls.LiveDataGrid uses this property, which is an instance of the System.Web.UI.StateBag class, to store the property values. The values are then passed as a variable to an HTML hidden input element when subsequent requests are processed.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.EditItemIndex Property

Gets or sets the index of an item in the LiveControls.LiveDataGrid control to edit.

[Visual Basic]
Overrides Public Property EditItemIndex As Integer
[C#]
public override int EditItemIndex {get; set;}

Property Value

The index of an item in the LiveControls.LiveDataGrid control to edit. The default value is -1, which indicates that no item in the LiveControls.LiveDataGrid control is being edited.

Remarks

Use the EditItemIndex property when the LiveControls.LiveDataGrid control contains a LiveControls.LiveEditCommandColumn to determine the index of the item selected in the LiveControls.LiveDataGrid control to edit.

This property is also used to programmatically control which item is being edited. Setting this property to an index of an item in the LiveControls.LiveDataGrid control will enable editing controls for that item in the LiveControls.LiveEditCommandColumn.

Note The EditItemIndex property is zero based.

To cancel editing, programmatically set this property to -1.

CAUTION Text is not HTML encoded before it is displayed in the LiveControls.LiveDataGrid control. This makes it possible to embed script within HTML tags in the text. If the values for the control come from user input, be sure to validate the values to reduce security vulnerabilities.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified index is less than -1.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.GridLines Property

Gets or sets a value that specifies whether the border between the cells of a data listing control is displayed.

[Visual Basic]
Overrides Public Property GridLines As GridLines
[C#]
public override System.Web.UI.WebControls.GridLines GridLines {get; set;}

Property Value

One of the GridLines values. The default value is Both.

Remarks

Use the GridLines property to specify whether the border between the cells of a data listing control is displayed. This property is set with one of the GridLines enumeration values.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.HorizontalAlign Property

Gets or sets the horizontal alignment of a data listing control within its container.

[Visual Basic]
Overrides Public Property HorizontalAlign As HorizontalAlign
[C#]
public override System.Web.UI.WebControls.HorizontalAlign HorizontalAlign {get; set;}

Property Value

One of the HorizontalAlign values. The default value is NotSet.

Remarks

Use the HorizontalAlign property to specify the horizontal alignment of a data listing control within its container. This property is set with one of the HorizontalAlign enumeration values.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.SelectedIndex Property

Gets or sets the index of the selected item in the LiveControls.LiveDataGrid control.

[Visual Basic]
Overrides Public Property SelectedIndex As Integer
[C#]
public override int SelectedIndex {get; set;}

Property Value

The index of the selected item in the LiveControls.LiveDataGrid control.

Remarks

Use the SelectedIndex property to determine the index of the item selected by the user in the LiveControls.LiveDataGrid control. You can also use this property to programmatically specify which item is selected in the LiveControls.LiveDataGrid control.

To deselect an item in the LiveControls.LiveDataGrid control, set this property to -1.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified index is less than -1.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid Methods

The methods of the LiveDataGrid class are listed below. For a complete list of LiveDataGrid class members, see the LiveDataGrid Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind | Binds the control and all its child controls to the data source specified by the BaseDataList.DataSource property.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveDataGrid Class | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.DataBind Method

Binds the control and all its child controls to the data source specified by the BaseDataList.DataSource property.

[Visual Basic]
Overrides Public Sub DataBind()
[C#]
public override void DataBind();

Remarks

Use the DataBind method to bind the data source specified by the BaseDataList.DataSource property with the data list control. By binding the data source with a data listing control, the information in the data source is displayed in a data listing control.

The DataBind method is also commonly used to synchronize the data source and a data listing control after information in the data source is updated. This allows any changes in the data source to also be updated in a data listing control.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.IPostBackEventHandler.RaisePostBackEvent Method

[Visual Basic]
Sub RaisePostBackEvent( _
   ByVal eventArgument As String _
) Implements _
   IPostBackEventHandler.RaisePostBackEvent
[C#]
void IPostBackEventHandler.RaisePostBackEvent(
   string eventArgument
);

Implements

IPostBackEventHandler.RaisePostBackEvent

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid Events

The events of the LiveDataGrid class are listed below. For a complete list of LiveDataGrid class members, see the LiveDataGrid Members topic.

Public Instance Events

CancelCommand (inherited from DataGrid) | Occurs when the Cancel button is clicked for an item in the DataGrid control.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
DeleteCommand (inherited from DataGrid) | Occurs when the Delete button is clicked for an item in the DataGrid control.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
EditCommand (inherited from DataGrid) | Occurs when the Edit button is clicked for an item in the DataGrid control.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
ItemCommand (inherited from DataGrid) | Occurs when any button is clicked in the DataGrid control.
ItemCreated (inherited from DataGrid) | Occurs on the server when an item in the DataGrid control is created.
ItemDataBound (inherited from DataGrid) | Occurs after an item is data bound to the DataGrid control.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PageIndexChanged (inherited from DataGrid) | Occurs when one of the page selection elements is clicked.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
SelectedIndexChanged (inherited from BaseDataList) | Occurs when a different item is selected in a data listing control between posts to the server.
SortCommand (inherited from DataGrid) | Occurs when a column is sorted.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.
UpdateCommand (inherited from DataGrid) | Occurs when the Update button is clicked for an item in the DataGrid control.

See Also

LiveDataGrid Class | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDataGrid.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDataGrid Class | LiveDataGrid Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList Class

Represents a control that allows the user to select a single item from a drop-down list.

For a list of all members of this type, see LiveDropDownList Members.

System.Object
Control
WebControl
ListControl
DropDownList
LiveDropDownList

[Visual Basic]
Public Class LiveDropDownList
Inherits DropDownList
Implements ILiveControl, ILiveWebControl, ILiveCallbackHandler
[C#]
public class LiveDropDownList : DropDownList, ILiveControl, ILiveWebControl, ILiveCallbackHandler

Remarks

Use the LiveDropDownList control to create a single selection drop-down list control. You can control the appearance of the LiveDropDownList control by setting the WebControl.BorderColor, WebControl.BorderStyle, and WebControl.BorderWidth properties.

To specify the items that you want to appear in the LiveDropDownList control, place a ListItem object, for each entry, between the opening and closing tags of the LiveDropDownList control.

The LiveDropDownList control also supports data binding. To bind the control to a data source, create a data source, such as an ArrayList object, that contains the items to display in the control. Then, use the DataBind method to bind the data source to the LiveDropDownList control.

Use the LiveListControl.SelectedIndex property to programmatically determine the index of the item selected by the user from the LiveDropDownList control.

Example

[Visual Basic, C#] The following example demonstrates different ways of adding items to a Live List control.

[Visual Basic]
'In the following examples, items are added to all four types of Live List controls
'These include the LiveListBox, LiveDropDownList, LiveRadioButtonList and LiveCheckBoxList
'Each Live List control can be interchanged with another

'Add items using an ArrayList, and show a LiveMessageBox when an item is selected

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Create a new ArrayList with the items to add to the Live list control
    Dim arrayItems As New ArrayList()
    arrayItems.Add("Alert")
    arrayItems.Add("Confirm")
    arrayItems.Add("Prompt")

    'Set the data source to the ArrayList and bind it to the Live list control
    LiveRadioButtonList1.DataSource = arrayItems
    LiveRadioButtonList1.DataBind()
End Sub

Private Sub LiveRadioButtonList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveRadioButtonList1.SelectedIndexChanged
    'When a type of MessageBox is selected from the list, show it
    Select Case (LiveRadioButtonList1.SelectedIndex)
    Case 0
        LiveMessageBox1.Show("You have selected 'Alert'", DialogType.Alert)
        Case 1
        LiveMessageBox1.Show("You have selected 'Confirm'", DialogType.Confirm)
        Case 2
        LiveMessageBox1.Show("You have selected 'Prompt'", DialogType.Prompt)
        Case Else
    End Select
End Sub

Private Sub LiveMessageBox1_Response(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.ResponseEventArgs) Handles LiveMessageBox1.Response
    'After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    'If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    If (e.DialogType = DialogType.Confirm) Then
        If (e.Confirmed) Then
        LiveTextBox1.Text = "The OK button was pressed"
        Else
        LiveTextBox1.Text = "The Cancel button was pressed"
        End If

        'If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    ElseIf (e.DialogType = DialogType.Prompt) Then
        If (Not e.Confirmed) Then
        LiveTextBox1.Text = "The Prompt was cancelled"
        Else
        LiveTextBox1.Text = "The inputted data was: " + e.Text
        End If
    End If
End Sub

'Add items dynamically, when a LiveButton is pressed

Private Sub LiveButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton2.Click
    'Add items dynamically in code to a list control
    'When the LiveButton is pressed, a new item is added to the list
    LiveListBox1.Items.Add(DateTime.Now.ToString())
End Sub

Private Sub LiveListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveListBox1.SelectedIndexChanged
    'A LiveLabel is updated whenever an item is selected from the list
    LiveLabel1.Text = "This item was added at " + LiveListBox1.Items(LiveListBox1.SelectedIndex).ToString()
End Sub

'Add items from a database, and display an image when an item is selected

Private Sub LiveButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton3.Click
    'Make sure that System.Data.OleDb is used

    'Get Items from a Database "images.mdb" in the folder "database"
    'The table is called "Table1" and the column with the filenames is "filename"
    Dim connection As New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"))
    Dim sql As String = "SELECT filename FROM Table1"
    Dim adapter As New OleDbDataAdapter(sql, connection)
    Dim dataSet As New DataSet("imagesDataSet")
    adapter.Fill(dataSet, "images")

    'Bind the database to the Live List
    LiveDropDownList1.DataSource = dataSet
    LiveDropDownList1.DataMember = "images"
    LiveDropDownList1.DataTextField = "filename"
    LiveDropDownList1.DataBind()

    'Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveDropDownList1.SelectedIndex = 0
    LiveDropDownList1_SelectedIndexChanged(Me, Nothing)
End Sub

Private Sub LiveDropDownList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveDropDownList1.SelectedIndexChanged
    'The Live List has been populated with some image filenames
    'When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image."
    LiveImage1.ImageUrl = "images/" + LiveDropDownList1.SelectedItem.Text
End Sub

'Add items to the Items.Collection and play a sound when an item is selected

Private Sub LiveButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton4.Click
    'Add items to the Live list control via the ListItemCollection
    LiveCheckBoxList1.Items.Add("chord.wav")
    LiveCheckBoxList1.Items.Add("chimes.wav")
    LiveCheckBoxList1.Items.Add("exclamation.wav")
    LiveCheckBoxList1.Items.Add("error.wav")
End Sub

Private Sub LiveCheckBoxList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveCheckBoxList1.SelectedIndexChanged
    'When an item in the LiveCheckBoxList is selected or de-selected
    'The selected sound that is topmost in the list will play
    If (LiveCheckBoxList1.SelectedIndex > -1) Then
        LiveSound1.Source = "sounds/" + LiveCheckBoxList1.Items(LiveCheckBoxList1.SelectedIndex).ToString()
        LiveSound1.Play()
    End If
End Sub
                    [C#]
//In the following examples, items are added to all four types of Live List controls
//These include the LiveListBox, LiveDropDownList, LiveRadioButtonList and LiveCheckBoxList
//Each Live List control can be interchanged with another

//Add items using an ArrayList, and show a LiveMessageBox when an item is selected

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Create a new ArrayList with the items to add to the Live list control
    ArrayList arrayItems = new ArrayList();
    arrayItems.Add("Alert");
    arrayItems.Add("Confirm");
    arrayItems.Add("Prompt");

    //Set the data source to the ArrayList and bind it to the Live list control
    LiveRadioButtonList1.DataSource = arrayItems;
    LiveRadioButtonList1.DataBind();
}

private void LiveRadioButtonList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When a type of MessageBox is selected from the list, show it
    switch (LiveRadioButtonList1.SelectedIndex)
    {
        case 0:
            LiveMessageBox1.Show("You have selected 'Alert'!", DialogType.Alert);
            break;
        case 1:
            LiveMessageBox1.Show("You have selected 'Confirm'!", DialogType.Confirm);
            break;
        case 2:
            LiveMessageBox1.Show("You have selected 'Prompt'!", DialogType.Prompt);
            break;
        default:
            break;
    }
}

private void LiveMessageBox1_Response(object sender, Dart.PowerWEB.LiveControls.ResponseEventArgs e)
{
    //After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    //If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    if (e.DialogType == DialogType.Confirm)
    {
        if (e.Confirmed)
            LiveTextBox1.Text = "The OK button was pressed!";
        else
            LiveTextBox1.Text = "The Cancel button was pressed!";
    }
    //If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    else if (e.DialogType == DialogType.Prompt)
    {
        if (!e.Confirmed)
            LiveTextBox1.Text = "The Prompt was cancelled!";
        else
            LiveTextBox1.Text = "The inputted data was: " + e.Text;
    }
}

//Add items dynamically, when a LiveButton is pressed

private void LiveButton2_Click(object sender, System.EventArgs e)
{
    //Add items dynamically in code to a list control
    //When the LiveButton is pressed, a new item is added to the list
    LiveListBox1.Items.Add(DateTime.Now.ToString());
}

private void LiveListBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //A LiveLabel is updated whenever an item is selected from the list
    LiveLabel1.Text = "This item was added at " + LiveListBox1.Items[LiveListBox1.SelectedIndex];
}

//Add items from a database, and display an image when an item is selected

private void LiveButton3_Click(object sender, System.EventArgs e)
{
    //Make sure that System.Data.OleDb is used

    //Get Items from a Database "images.mdb" in the folder "database"
    //The table is called "Table1" and the column with the filenames is "filename"
    OleDbConnection connection = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"));
    string sql = "SELECT filename FROM Table1";
    OleDbDataAdapter adapter = new OleDbDataAdapter(sql, connection);
    DataSet dataSet = new DataSet("imagesDataSet");
    adapter.Fill(dataSet, "images");

    //Bind the database to the Live List
    LiveDropDownList1.DataSource = dataSet;
    LiveDropDownList1.DataMember = "images";
    LiveDropDownList1.DataTextField = "filename";
    LiveDropDownList1.DataBind();

    //Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveDropDownList1.SelectedIndex = 0;
    LiveDropDownList1_SelectedIndexChanged(this, null);
}

private void LiveDropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //The Live List has been populated with some image filenames
    //When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image.";
    LiveImage1.ImageUrl = "images/" + LiveDropDownList1.SelectedItem.Text;
}

//Add items to the Items.Collection and play a sound when an item is selected

private void LiveButton4_Click(object sender, System.EventArgs e)
{
    //Add items to the Live list control via the ListItemCollection
    LiveCheckBoxList1.Items.Add("chord.wav");
    LiveCheckBoxList1.Items.Add("chimes.wav");
    LiveCheckBoxList1.Items.Add("exclamation.wav");
    LiveCheckBoxList1.Items.Add("error.wav");
}

private void LiveCheckBoxList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When an item in the LiveCheckBoxList is selected or de-selected
    //The selected sound that is topmost in the list will play
    if (LiveCheckBoxList1.SelectedIndex > -1)
    {
        LiveSound1.Source = "sounds/" + LiveCheckBoxList1.Items[LiveCheckBoxList1.SelectedIndex];
        LiveSound1.Play();
    }
}

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList Members

Public Instance Constructors

LiveDropDownList Constructor Initializes a new instance of LiveDropDownList.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataMember (inherited from ListControl) | Gets or sets the specific table in the DataSource to bind to the control.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
DataSource (inherited from ListControl) | Gets or sets the data source that populates the items of the list control.
DataTextField (inherited from ListControl) | Gets or sets the field of the data source that provides the text content of the list items.
DataTextFormatString (inherited from ListControl) | Gets or sets the formatting string used to control how data bound to the list control is displayed.
DataValueField (inherited from ListControl) | Gets or sets the field of the data source that provides the value of each list item.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Items (inherited from ListControl) | Gets the collection of items in the list control.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
SelectedIndex | Gets or sets the lowest ordinal index of the selected items in the list.
SelectedItem (inherited from ListControl) | Gets the selected item with the lowest index in the list control.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
ClearSelection (inherited from ListControl) |
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
SelectedIndexChanged (inherited from ListControl) | Occurs when the selection on the list changes and is posted back to the server.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

See Also

LiveDropDownList Class | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList Constructor

Initializes a new instance of LiveDropDownList.

[Visual Basic]
Public Sub New()
[C#]
public LiveDropDownList();

Remarks

The default constructor initializes a new instance of LiveDropDownList.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList Properties

The properties of the LiveDropDownList class are listed below. For a complete list of LiveDropDownList class members, see the LiveDropDownList Members topic.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataMember (inherited from ListControl) | Gets or sets the specific table in the DataSource to bind to the control.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
DataSource (inherited from ListControl) | Gets or sets the data source that populates the items of the list control.
DataTextField (inherited from ListControl) | Gets or sets the field of the data source that provides the text content of the list items.
DataTextFormatString (inherited from ListControl) | Gets or sets the formatting string used to control how data bound to the list control is displayed.
DataValueField (inherited from ListControl) | Gets or sets the field of the data source that provides the value of each list item.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Items (inherited from ListControl) | Gets the collection of items in the list control.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
SelectedIndex | Gets or sets the lowest ordinal index of the selected items in the list.
SelectedItem (inherited from ListControl) | Gets the selected item with the lowest index in the list control.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveDropDownList Class | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.AccessKey Property

Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.

[Visual Basic]
Overrides Public Property AccessKey As String
[C#]
public override string AccessKey {get; set;}

Property Value

The access key for quick navigation to the LiveControl. The default value is String.Empty, which indicates that this property is not set.

Remarks

Use the AccessKey property to specify the keyboard shortcut for the LiveControl. This allows you to navigate quickly to the control by pressing the ALT key and the key for the specified character on the keyboard. For example, setting the access key of a control to the string "D" indicates that the user can navigate to the control by pressing ALT+D.

Only a single character string is allowed for the AccessKey property. If you attempt to set this property to a value that is not a null reference (Nothing in Visual Basic), String.Empty, or a single character string, an exception is thrown.

Exceptions

Exception Type | Condition
ArgumentException | The specified access key is not either a null reference (Nothing in Visual Basic), String.Empty, or a single character string.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.AutoPostBack Property

Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.

[Visual Basic]
Overrides Public Property AutoPostBack As Boolean
[C#]
public override bool AutoPostBack {get; set;}

Property Value

true whenever the user changes the text in the text box and then tabs out of the control; otherwise, false. The default is true, which is different than the non-Live TextBox.

Remarks

For Live List Controls, set this property to true if the server needs to capture the change as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's selection from the list control. This property can be used to allow automatic population of other controls on the Web page based on a user's selection from the list.

For LiveCheckBox and LiveRadioButton, use this property to specify whether the state of the LiveControl is posted back to the server when clicked.

Note When AutoPostBack is true and ILiveCallbackHandler.EnableCallback is true, the LiveControl will perform automatic callbacks. If ILiveCallbackHandler.EnableCallback is false, traditional postbacks will occur.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.SelectedIndex Property

Gets or sets the lowest ordinal index of the selected items in the list.

[Visual Basic]
Overrides Public Property SelectedIndex As Integer
[C#]
public override int SelectedIndex {get; set;}

Property Value

The lowest ordinal index of the selected items in the list. The default is -1, which indicates that nothing is selected.

Remarks

Use this property to determine the index of the currently selected item in the list if the list control allows only one selection. If the list control supports multiple selections, use this property to determine the lowest index of the selected items.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The index was set to less than -1, or greater than or equal to the number of items on the list.

Example

[Visual Basic, C#] The following example demonstrates adding items to a Live List control from a database, as well as updating a LiveImage control.

[Visual Basic]
'In this example, items are added to a Live List control from a database
'The items are images to be displayed in a LiveImage
'When one of the items is selected, the corresponding image is displayed
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Make sure that System.Data.OleDb is used

    'Get Items from a Database "images.mdb" in the folder "database"
    'The table is called "Table1" and the column with the filenames is "filename"
    Dim connection As New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"))
    Dim sql As String = "SELECT filename FROM Table1"
    Dim adapter As New OleDbDataAdapter(sql, connection)
    Dim dataSet As New DataSet("imagesDataSet")
    adapter.Fill(DataSet, "images")

    'Bind the database to the Live List
    LiveList1.DataSource = DataSet
    LiveList1.DataMember = "images"
    LiveList1.DataTextField = "filename"
    LiveList1.DataBind()

    'Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveList1.SelectedIndex = 0
    LiveList1_SelectedIndexChanged(Me, Nothing)
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles     LiveList1.SelectedIndexChanged
    'The Live List has been populated with some image filenames
    'When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image."
    LiveImage1.ImageUrl = "images/" + LiveList1.SelectedItem.Text
End Sub
                    [C#]
//In this example, items are added to a Live List control from a database
//The items are images to be displayed in a LiveImage
//When one of the items is selected, the corresponding image is displayed
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Make sure that System.Data.OleDb is used

    //Get Items from a Database "images.mdb" in the folder "database"
    //The table is called "Table1" and the column with the filenames is "filename"
    OleDbConnection connection = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"));
    string sql = "SELECT filename FROM Table1";
    OleDbDataAdapter adapter = new OleDbDataAdapter(sql, connection);
    DataSet dataSet = new DataSet("imagesDataSet");
    adapter.Fill(dataSet, "images");

    //Bind the database to the Live List
    LiveList1.DataSource = dataSet;
    LiveList1.DataMember = "images";
    LiveList1.DataTextField = "filename";
    LiveList1.DataBind();

    //Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveList1.SelectedIndex = 0;
    LiveList1_SelectedIndexChanged(this, null);
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //The Live List has been populated with some image filenames
    //When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image.";
    LiveImage1.ImageUrl = "images/" + LiveList1.SelectedItem.Text;
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList Methods

The methods of the LiveDropDownList class are listed below. For a complete list of LiveDropDownList class members, see the LiveDropDownList Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
ClearSelection (inherited from ListControl) |
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

See Also

LiveDropDownList Class | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.IPostBackDataHandler.LoadPostData Method

When implemented by a class, processes post back data for an ASP.NET server control.

[Visual Basic]
Function LoadPostData( _
   ByVal postDataKey As String, _
   ByVal postCollection As NameValueCollection _
) As Boolean Implements _
   IPostBackDataHandler.LoadPostData
[C#]
new bool IPostBackDataHandler.LoadPostData(
   string postDataKey,
   NameValueCollection postCollection
);

Parameters

postDataKey
The key identifier for the control.
postCollection
The collection of all incoming name values.

Implements

IPostBackDataHandler.LoadPostData

Remarks

The Web Forms page framework tracks all the server control's that return true to this method call, then invokes the IPostBackDataHandler.RaisePostDataChangedEvent on those controls.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.IPostBackDataHandler.RaisePostDataChangedEvent Method

When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

[Visual Basic]
Sub RaisePostDataChangedEvent() Implements _
   IPostBackDataHandler.RaisePostDataChangedEvent
[C#]
new void IPostBackDataHandler.RaisePostDataChangedEvent();

Implements

IPostBackDataHandler.RaisePostDataChangedEvent

Remarks

Change events for the server control that implements this interface, if any, are raised from this method.

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList Events

The events of the LiveDropDownList class are listed below. For a complete list of LiveDropDownList class members, see the LiveDropDownList Members topic.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
SelectedIndexChanged (inherited from ListControl) | Occurs when the selection on the list changes and is posted back to the server.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveDropDownList Class | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownList.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveDropDownList Class | LiveDropDownList Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownListColumn Class

A column type for the LiveControls.LiveDataGrid control that contains dropdown lists.

For a list of all members of this type, see LiveDropDownListColumn Members.

System.Object
DataGridColumn
LiveDropDownListColumn

[Visual Basic]
Public Class LiveDropDownListColumn
Inherits DataGridColumn
[C#]
public class LiveDropDownListColumn : DataGridColumn

Remarks

Use the LiveDropDownListColumn column type in a LiveControls.LiveDataGrid control to create a dropdown list that corresponds with each row in the LiveControls.LiveDataGrid control.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveDropDownListColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownListColumn Members

Public Instance Constructors

LiveDropDownListColumn Constructor Initializes a new instance of LiveDropDownListColumn.

Public Instance Properties

AutoPostback | Gets or sets a value indicating whether the dropdowns automatically post back to the server when checked.
DataSource | Gets or sets the data source that populates the items of the list control.
DataTextField | Gets or sets the field of the data source that provides the text content of the list items.
DataTextFormatString | Gets or sets the formatting string used to control how data bound to the list control is displayed.
DataValueField | Gets or sets the field of the data source that provides the value of each list item.
FooterStyle (inherited from DataGridColumn) | Gets the style properties for the footer section of the column.
FooterText (inherited from DataGridColumn) | Gets or sets the text displayed in the footer section of the column.
HeaderImageUrl (inherited from DataGridColumn) | Gets or sets the location of an image to display in the header section of the column.
HeaderStyle (inherited from DataGridColumn) | Gets the style properties for the header section of the column.
HeaderText (inherited from DataGridColumn) | Gets or sets the text displayed in the header section of the column.
ItemStyle (inherited from DataGridColumn) | Gets the style properties for the item cells of the column.
SortExpression (inherited from DataGridColumn) | Gets or sets the name of the field or expression to pass to the OnSortCommand method when a column is selected for sorting.
Visible (inherited from DataGridColumn) | Gets or sets a value that indicates whether the column is visible in the DataGrid control.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from DataGridColumn) | Provides the base implementation to reset a column derived from the DataGridColumn class to its initial state.
InitializeCell | Resets the specified cell in the LiveControls.LiveDropDownListColumn to its initial state.
ToString (inherited from DataGridColumn) |

Explicit Interface Implementations

IStateManager.LoadViewState (inherited from DataGridColumn)
IStateManager.SaveViewState (inherited from DataGridColumn)
IStateManager.TrackViewState (inherited from DataGridColumn)

See Also

LiveDropDownListColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveDropDownListColumn Constructor

Initializes a new instance of LiveDropDownListColumn.

[Visual Basic]
Public Sub New()
[C#]
public LiveDropDownListColumn();

Remarks

The default constructor initializes a new instance of LiveDropDownListColumn.

See Also

LiveDropDownListColumn Class | LiveDropDownListColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownListColumn Properties

The properties of the LiveDropDownListColumn class are listed below. For a complete list of LiveDropDownListColumn class members, see the LiveDropDownListColumn Members topic.

Public Instance Properties

AutoPostback | Gets or sets a value indicating whether the dropdowns automatically post back to the server when checked.
DataSource | Gets or sets the data source that populates the items of the list control.
DataTextField | Gets or sets the field of the data source that provides the text content of the list items.
DataTextFormatString | Gets or sets the formatting string used to control how data bound to the list control is displayed.
DataValueField | Gets or sets the field of the data source that provides the value of each list item.
FooterStyle (inherited from DataGridColumn) | Gets the style properties for the footer section of the column.
FooterText (inherited from DataGridColumn) | Gets or sets the text displayed in the footer section of the column.
HeaderImageUrl (inherited from DataGridColumn) | Gets or sets the location of an image to display in the header section of the column.
HeaderStyle (inherited from DataGridColumn) | Gets the style properties for the header section of the column.
HeaderText (inherited from DataGridColumn) | Gets or sets the text displayed in the header section of the column.
ItemStyle (inherited from DataGridColumn) | Gets the style properties for the item cells of the column.
SortExpression (inherited from DataGridColumn) | Gets or sets the name of the field or expression to pass to the OnSortCommand method when a column is selected for sorting.
Visible (inherited from DataGridColumn) | Gets or sets a value that indicates whether the column is visible in the DataGrid control.

See Also

LiveDropDownListColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveDropDownListColumn.AutoPostback Property

Gets or sets a value indicating whether the dropdowns automatically post back to the server when checked.

[Visual Basic]
Public Property AutoPostback As Boolean
[C#]
public bool AutoPostback {get; set;}

Property Value

true to automatically post to the server; otherwise, false. The default is true.

Remarks

Use this property to specify whether the state of the LiveControls.LiveDropDownListColumn is posted back to the server when clicked (via callback or postback, depending on the value of ILiveCallbackHandler.EnableCallback).

See Also

LiveDropDownListColumn Class | LiveDropDownListColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownListColumn.DataSource Property

Gets or sets the data source that populates the items of the list control.

[Visual Basic]
Public Property DataSource As String
[C#]
public string DataSource {get; set;}

Property Value

A data source that provides data for populating the list control.

Remarks

Use this property to specify a source of data to populate a list control.

The items in the Items collection are initialized from LiveDropDownListColumn.DataTextField and LiveDropDownListColumn.DataValueField.

See Also

LiveDropDownListColumn Class | LiveDropDownListColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownListColumn.DataTextField Property

Gets or sets the field of the data source that provides the text content of the list items.

[Visual Basic]
Public Property DataTextField As String
[C#]
public string DataTextField {get; set;}

Property Value

A System.String that specifies the field of the data source that provides the text content of the list items. The default is String.Empty.

Remarks

Use this property to specify a field in the LiveDropDownListColumn.DataSource to display as the items of the list in a list control.

See Also

LiveDropDownListColumn Class | LiveDropDownListColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownListColumn.DataTextFormatString Property

Gets or sets the formatting string used to control how data bound to the list control is displayed.

[Visual Basic]
Public Property DataTextFormatString As String
[C#]
public string DataTextFormatString {get; set;}

Property Value

The formatting string for data bound to the control. The default value is String.Empty.

Remarks

Use the DataTextFormatString property to provide a custom display format for the caption of the command buttons in the column.

The data format string consists of two parts, separated by a colon, in the form { A: Bxx }. For example, the formatting string {0:F2} would format the cell to display a fixed point number with two decimal places.

Note The entire string must be enclosed in braces to indicate that it is a format string and not a literal string. Any text outside the braces is displayed as literal text.

The value before the colon (A in the general example) specifies the parameter index in a zero-based list of parameters.

Note This value can only be set to 0 because there is only one value in each cell.

The character after the colon (B in the general example) specifies the format to display the value in. The following table lists the common formats.

Format Character | Description
C | Displays numeric values in currency format.
D | Displays numeric values in decimal format.
E | Displays numeric values in scientific (exponential) format.
F | Displays numeric values in fixed format.
G | Displays numeric values in general format.
N | Displays numeric values in number format.
X | Displays numeric values in hexadecimal format.

Note The format character is not case-sensitive, except for X, which displays the hexadecimal characters in the case specified.

The value after the format character (xx in the general example) specifies the number of significant digits or decimal places to display.

The following table contains examples of formatting strings and the results. It assumes standard English settings.

Numeric Value | Format String | Result
12345.6789 | "{0:C}" | $12,345.68
-12345.6789 | "{0:C}" | ($12,345.68)
12345 | "{0:D}" | 12345
12345 | "{0:D8}" | 00012345
12345.6789 | "{0:E}" | 1234568E+004
12345.6789 | "{0:E10}" | 1.2345678900E+004
12345.6789 | "{0:F}" | 12345.68
12345.6789 | "{0:F0}" | 12346
12345.6789 | "{0:G}" | 12345.6789
123456789 | "{0:G7}" | 1.234568E8
12345.6789 | "{0:N}" | 12,345.68
123456789 | "{0:N4}" | 123,456,789.0000
12345.6789 | "Total: {0:C}" | Total: $12345.68

For more information on formatting strings, see Formatting Overview.

See Also

LiveDropDownListColumn Class | LiveDropDownListColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownListColumn.DataValueField Property

Gets or sets the field of the data source that provides the value of each list item.

[Visual Basic]
Public Property DataValueField As String
[C#]
public string DataValueField {get; set;}

Property Value

A System.String that specifies the field of the data source that provides the value of each list item. The default is String.Empty.

Remarks

Use this property to specify the field that contains the value of each item in a list control.

See Also

LiveDropDownListColumn Class | LiveDropDownListColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveDropDownListColumn Methods

The methods of the LiveDropDownListColumn class are listed below. For a complete list of LiveDropDownListColumn class members, see the LiveDropDownListColumn Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from DataGridColumn) | Provides the base implementation to reset a column derived from the DataGridColumn class to its initial state.
InitializeCell | Resets the specified cell in the LiveControls.LiveDropDownListColumn to its initial state.
ToString (inherited from DataGridColumn) |

Explicit Interface Implementations

IStateManager.LoadViewState (inherited from DataGridColumn)
IStateManager.SaveViewState (inherited from DataGridColumn)
IStateManager.TrackViewState (inherited from DataGridColumn)

See Also

LiveDropDownListColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveDropDownListColumn.InitializeCell Method

Resets the specified cell in the LiveControls.LiveDropDownListColumn to its initial state.

[Visual Basic]
Overrides Public Sub InitializeCell( _
   ByVal cell As TableCell, _
   ByVal columnIndex As Integer, _
   ByVal itemType As ListItemType _
)
[C#]
public override void InitializeCell(
   TableCell cell,
   int columnIndex,
   ListItemType itemType
);

Parameters

cell
A TableCell object that represents the cell to reset.
columnIndex
The column number where the cell is located.
itemType
One of the ListItemType values.

Remarks

The InitializeCell method resets the specified cell in the LiveControls.LiveDropDownListColumn to its initial state.

See Also

LiveDropDownListColumn Class | LiveDropDownListColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveEditCommandColumn Class

A special column type for the LiveControls.LiveDataGrid control that contains the Edit command buttons for editing data items in each row.

For a list of all members of this type, see LiveEditCommandColumn Members.

System.Object
DataGridColumn
EditCommandColumn
LiveEditCommandColumn

[Visual Basic]
Public Class LiveEditCommandColumn
Inherits EditCommandColumn
[C#]
public class LiveEditCommandColumn : EditCommandColumn

Remarks

Use the LiveEditCommandColumn class to create a special column for the LiveControls.LiveDataGrid control that contains the Edit, Update, and Cancel command buttons for each data row in the grid. These buttons allow you to edit the values of a row in the LiveControls.LiveDataGrid control.

If no row is selected, an Edit command button displays in the LiveEditCommandColumn for each data row in the LiveControls.LiveDataGrid control. When the Edit button for an item is clicked, the EditCommand event is raised and the Edit button is replaced with the Update and Cancel command buttons. You need to provide code to handle this event. A typical event handler sets the EditItemIndex property to the selected row and then rebinds the data to the LiveControls.LiveDataGrid control.

Note You must provide values for the CancelText, EditText, and UpdateText properties. Otherwise, the associated command buttons will not appear in the LiveEditCommandColumn.

The buttons in the LiveEditCommandColumn can be set to display as hyperlinks or push buttons by setting the ButtonType property.

Clicking the Update or Cancel command button raises the UpdateCommand or CancelCommand event, respectively. You need to provide code to handle these events.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveEditCommandColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveEditCommandColumn Members

Public Instance Constructors

LiveEditCommandColumn Constructor Initializes a new instance of LiveEditCommandColumn.

Public Instance Properties

ButtonType (inherited from EditCommandColumn) | Gets or sets the button type for the column.
CancelText (inherited from EditCommandColumn) | Gets or sets the text to display for the Cancel command button in the EditCommandColumn.
EditText (inherited from EditCommandColumn) | Gets or sets the text to display for the Edit command button in the EditCommandColumn.
FooterStyle (inherited from DataGridColumn) | Gets the style properties for the footer section of the column.
FooterText (inherited from DataGridColumn) | Gets or sets the text displayed in the footer section of the column.
HeaderImageUrl (inherited from DataGridColumn) | Gets or sets the location of an image to display in the header section of the column.
HeaderStyle (inherited from DataGridColumn) | Gets the style properties for the header section of the column.
HeaderText (inherited from DataGridColumn) | Gets or sets the text displayed in the header section of the column.
ItemStyle (inherited from DataGridColumn) | Gets the style properties for the item cells of the column.
SortExpression (inherited from DataGridColumn) | Gets or sets the name of the field or expression to pass to the OnSortCommand method when a column is selected for sorting.
UpdateText (inherited from EditCommandColumn) | Gets or sets the text to display for the Update command button in the EditCommandColumn.
Visible (inherited from DataGridColumn) | Gets or sets a value that indicates whether the column is visible in the DataGrid control.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from DataGridColumn) | Provides the base implementation to reset a column derived from the DataGridColumn class to its initial state.
InitializeCell | Resets the specified cell in the LiveControls.LiveEditCommandColumn to its initial state.
ToString (inherited from DataGridColumn) |

Explicit Interface Implementations

IStateManager.LoadViewState (inherited from DataGridColumn)
IStateManager.SaveViewState (inherited from DataGridColumn)
IStateManager.TrackViewState (inherited from DataGridColumn)

See Also

LiveEditCommandColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveEditCommandColumn Constructor

Initializes a new instance of LiveEditCommandColumn.

[Visual Basic]
Public Sub New()
[C#]
public LiveEditCommandColumn();

Remarks

The default constructor initializes a new instance of LiveEditCommandColumn.

See Also

LiveEditCommandColumn Class | LiveEditCommandColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveEditCommandColumn Methods

The methods of the LiveEditCommandColumn class are listed below. For a complete list of LiveEditCommandColumn class members, see the LiveEditCommandColumn Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from DataGridColumn) | Provides the base implementation to reset a column derived from the DataGridColumn class to its initial state.
InitializeCell | Resets the specified cell in the LiveControls.LiveEditCommandColumn to its initial state.
ToString (inherited from DataGridColumn) |

Explicit Interface Implementations

IStateManager.LoadViewState (inherited from DataGridColumn)
IStateManager.SaveViewState (inherited from DataGridColumn)
IStateManager.TrackViewState (inherited from DataGridColumn)

See Also

LiveEditCommandColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveEditCommandColumn.InitializeCell Method

Resets the specified cell in the LiveControls.LiveEditCommandColumn to its initial state.

[Visual Basic]
Overrides Public Sub InitializeCell( _
   ByVal cell As TableCell, _
   ByVal columnIndex As Integer, _
   ByVal itemType As ListItemType _
)
[C#]
public override void InitializeCell(
   TableCell cell,
   int columnIndex,
   ListItemType itemType
);

Parameters

cell
A TableCell object that represents the cell to reset.
columnIndex
The column number where the cell is located.
itemType
One of the ListItemType values.

Remarks

The InitializeCell method resets the specified cell in the LiveControls.LiveEditCommandColumn to its initial state.

See Also

LiveEditCommandColumn Class | LiveEditCommandColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveFontInfo Class

Encapsulates the font properties of a LiveControl's text.

For a list of all members of this type, see LiveFontInfo Members.

System.Object
LiveFontInfo

[Visual Basic]
Public Class LiveFontInfo
[C#]
public class LiveFontInfo

Remarks

Use the LiveFontInfo class to encapsulate the font properties of text. You can specify the font name and font size. You can also specify whether the style of the font is bold, italic, overlined, strikethrough, or underlined.

This class is commonly used in a property for a class that requires font information, such as the WebControl.Font property of LiveControls.

Note This class does not have a public constructor. A new instance of the class cannot be created directly.

Note This class is used in LiveControls, instead of FontInfo.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveFontInfo Members | Dart.PowerWEB.LiveControls Namespace


LiveFontInfo Members

Public Instance Constructors

LiveFontInfo Constructor Initializes a new instance of LiveFontInfo.

Public Instance Properties

Bold | Gets or sets a value that indicates whether the font is bold.
Italic | Gets or sets a value that indicates whether the font is italic.
Name | Gets or sets the primary font name.
Names | Gets or sets an ordered array of font names.
Overline | Gets or sets a value that indicates whether the font is overlined.
Size | Gets or sets the font size.
Strikeout | Gets or sets a value that indicates whether the font is strikethrough.
Underline | Gets or sets a value that indicates whether the font is underlined.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

LiveFontInfo Class | Dart.PowerWEB.LiveControls Namespace


LiveFontInfo Constructor

Initializes a new instance of LiveFontInfo.

[Visual Basic]
Public Sub New( _
   ByVal parentControl As WebControl _
)
[C#]
public LiveFontInfo(
   WebControl parentControl
);

Remarks

Initializes a new instance of LiveFontInfo with the parent control as a parameter.

See Also

LiveFontInfo Class | LiveFontInfo Members | Dart.PowerWEB.LiveControls Namespace


LiveFontInfo Properties

The properties of the LiveFontInfo class are listed below. For a complete list of LiveFontInfo class members, see the LiveFontInfo Members topic.

Public Instance Properties

Bold | Gets or sets a value that indicates whether the font is bold.
Italic | Gets or sets a value that indicates whether the font is italic.
Name | Gets or sets the primary font name.
Names | Gets or sets an ordered array of font names.
Overline | Gets or sets a value that indicates whether the font is overlined.
Size | Gets or sets the font size.
Strikeout | Gets or sets a value that indicates whether the font is strikethrough.
Underline | Gets or sets a value that indicates whether the font is underlined.

See Also

LiveFontInfo Class | Dart.PowerWEB.LiveControls Namespace


LiveFontInfo.Bold Property

Gets or sets a value that indicates whether the font is bold.

[Visual Basic]
Public Property Bold As Boolean
[C#]
public bool Bold {get; set;}

Property Value

true if the font is bold; otherwise, false. The default value is false.

Remarks

Use the Bold property to specify or determine whether the font is bold.

See Also

LiveFontInfo Class | LiveFontInfo Members | Dart.PowerWEB.LiveControls Namespace


LiveFontInfo.Italic Property

Gets or sets a value that indicates whether the font is italic.

[Visual Basic]
Public Property Italic As Boolean
[C#]
public bool Italic {get; set;}

Property Value

true if the font is italic; otherwise, false. The default value is false.

Remarks

Use the Italic property to specify or determine whether the font is italic.

See Also

LiveFontInfo Class | LiveFontInfo Members | Dart.PowerWEB.LiveControls Namespace


LiveFontInfo.Name Property

Gets or sets the primary font name.

[Visual Basic]
Public Property Name As String
[C#]
public string Name {get; set;}

Property Value

The primary font name. The default value is String.Empty, which indicates that this property is not set.

Remarks

Use the Name property to specify or determine the primary font name. The primary font name determines the font that is used to display text in the control associated with the LiveFontInfo.

Note When you set the LiveFontInfo.Names property, the Name property is automatically updated with the first item in the LiveFontInfo.Names property. If you set the Name property, the LiveFontInfo.Names property is automatically updated with a single element array containing the value of the Name property.

Exceptions

Exception Type | Condition
ArgumentException | The specified font name is a null reference (Nothing in Visual Basic).

See Also

LiveFontInfo Class | LiveFontInfo Members | Dart.PowerWEB.LiveControls Namespace


LiveFontInfo.Names Property

Gets or sets an ordered array of font names.

[Visual Basic]
Public Property Names As String()
[C#]
public string[] Names {get; set;}

Property Value

An ordered array of font names.

Remarks

Use the Names property to specify or determine an ordered array of font names for a LiveFontInfo. The Names property is commonly used to store a list of available font names.

Note When you set the Names property, the LiveFontInfo.Name property is automatically updated with the first item in the Names property. If you set the LiveFontInfo.Name property, the Names property is automatically updated with a single element array containing the value of the LiveFontInfo.Name property.

To specify the font name for the LiveFontInfo using the Names array, set the first element in the array to the font name you want to use. Since the Names property is automatically updated when the LiveFontInfo.Name property is set, you need to manipulate the Names array to rearrange the order of the items in the array instead of setting the LiveFontInfo.Name property directly.

See Also

LiveFontInfo Class | LiveFontInfo Members | Dart.PowerWEB.LiveControls Namespace


LiveFontInfo.Overline Property

Gets or sets a value that indicates whether the font is overlined.

[Visual Basic]
Public Property Overline As Boolean
[C#]
public bool Overline {get; set;}

Property Value

true if the font is overlined; otherwise, false. The default value is false.

Remarks

Use the Overline property to specify or determine whether the font is overlined.

See Also

LiveFontInfo Class | LiveFontInfo Members | Dart.PowerWEB.LiveControls Namespace


LiveFontInfo.Size Property

Gets or sets the font size.

[Visual Basic]
Public Property Size As FontUnit
[C#]
public System.Web.UI.WebControls.FontUnit Size {get; set;}

Property Value

A FontUnit that represents the font size.

Remarks

Use the Size property to specify the size of the font.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified font size is negative.

See Also

LiveFontInfo Class | LiveFontInfo Members | Dart.PowerWEB.LiveControls Namespace


LiveFontInfo.Strikeout Property

Gets or sets a value that indicates whether the font is strikethrough.

[Visual Basic]
Public Property Strikeout As Boolean
[C#]
public bool Strikeout {get; set;}

Property Value

true if the font is struck through; otherwise, false. The default value is false.

Remarks

Use the Strikeout property to specify or determine whether the font contains a line through the text.

See Also

LiveFontInfo Class | LiveFontInfo Members | Dart.PowerWEB.LiveControls Namespace


LiveFontInfo.Underline Property

Gets or sets a value that indicates whether the font is underlined.

[Visual Basic]
Public Property Underline As Boolean
[C#]
public bool Underline {get; set;}

Property Value

true if the font is underlined; otherwise, false. The default value is false.

Remarks

Use the Underline property to specify or determine whether the font contains a line under the text.

See Also

LiveFontInfo Class | LiveFontInfo Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink Class

A control that displays a link to another Web page.

For a list of all members of this type, see LiveHyperLink Members.

System.Object
Control
WebControl
HyperLink
LiveHyperLink

[Visual Basic]
Public Class LiveHyperLink
Inherits HyperLink
Implements ILiveControl, ILiveWebControl, IPostBackEventHandler, ILiveCallbackHandler
[C#]
public class LiveHyperLink : HyperLink, ILiveControl, ILiveWebControl, IPostBackEventHandler, ILiveCallbackHandler

Remarks

Use the LiveHyperLink control to create a link to another Web page. The LiveHyperLink control is typically displayed as text specified by the LiveHyperLink.Text property. It can also be displayed as an image specified by the LiveHyperLink.ImageUrl property.

If both the LiveHyperLink.Text and LiveHyperLink.ImageUrl properties are set, the LiveHyperLink.ImageUrl property takes precedence. If the image is unavailable, the text in the LiveHyperLink.Text property is displayed. In browsers that support ToolTip functionality, the LiveHyperLink.Text property also becomes the WebControl.ToolTip.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink Members

Public Instance Constructors

LiveHyperLink Constructor Initializes a new instance of LiveHyperLink.

Public Instance Properties

AccessKey (inherited from WebControl) | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the Web server control.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
ImageUrl | Gets or sets the path to an image to display for the LiveControls.LiveHyperLink control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
NavigateUrl | Gets or sets the URL to link to when the LiveControls.LiveHyperLink control is clicked.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
Target | Gets or sets the target window or frame to display the Web page content linked to when the LiveControls.LiveHyperLink control is clicked.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text caption for the LiveControls.LiveHyperLink control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

Click | Occurs when the LiveControls.LiveHyperLink control is clicked.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveHyperLink Class | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink Constructor

Initializes a new instance of LiveHyperLink.

[Visual Basic]
Public Sub New()
[C#]
public LiveHyperLink();

Remarks

The default constructor initializes a new instance of LiveHyperLink.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink Properties

The properties of the LiveHyperLink class are listed below. For a complete list of LiveHyperLink class members, see the LiveHyperLink Members topic.

Public Instance Properties

AccessKey (inherited from WebControl) | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the Web server control.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
ImageUrl | Gets or sets the path to an image to display for the LiveControls.LiveHyperLink control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
NavigateUrl | Gets or sets the URL to link to when the LiveControls.LiveHyperLink control is clicked.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
Target | Gets or sets the target window or frame to display the Web page content linked to when the LiveControls.LiveHyperLink control is clicked.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text caption for the LiveControls.LiveHyperLink control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveHyperLink Class | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.ImageUrl Property

Gets or sets the path to an image to display for the LiveControls.LiveHyperLink control.

[Visual Basic]
Public Property ImageUrl As String
[C#]
new public string ImageUrl {get; set;}

Property Value

The path to the image to display for the LiveControls.LiveHyperLink control. The default value is String.Empty.

Remarks

The LiveControls.LiveHyperLink control can be displayed as text or an image. Use the ImageUrl property to specify an image to display for the LiveControls.LiveHyperLink control.

Note If both the LiveHyperLink.Text and ImageUrl properties are set, the ImageUrl property takes precedence. If the image is unavailable, the text in the LiveHyperLink.Text property is displayed. In browsers that support ToolTip functionality, the LiveHyperLink.Text property also becomes the WebControl.ToolTip.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.NavigateUrl Property

Gets or sets the URL to link to when the LiveControls.LiveHyperLink control is clicked.

[Visual Basic]
Public Property NavigateUrl As String
[C#]
new public string NavigateUrl {get; set;}

Property Value

The URL to link to when the LiveControls.LiveHyperLink control is clicked. The default value is String.Empty.

Remarks

Use the NavigateUrl property to specify the URL to navigate to when the LiveControls.LiveHyperLink control is clicked.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Target Property

Gets or sets the target window or frame to display the Web page content linked to when the LiveControls.LiveHyperLink control is clicked.

[Visual Basic]
Public Property Target As String
[C#]
new public string Target {get; set;}

Property Value

The target window or frame to load the Web page linked to when the LiveControls.LiveHyperLink control is clicked. Values must begin with a letter in the range of a through z (case insensitive), except for the following special values, which begin with an underscore:

_blank | Renders the content in a new window without frames.
_parent | Renders the content in the immediate frameset parent.
_self | Renders the content in the frame with focus.
_top | Renders the content in the full window without frames.

The default value is String.Empty.

Remarks

Use the Target property to specify the frame or window that displays the Web page linked to when the LiveControls.LiveHyperLink control is clicked. The Web page is specified by setting the NavigateUrl property.

If this property is not set, the browser or window with focus refreshes when the LiveControls.LiveHyperLink control is clicked.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Text Property

Gets or sets the text caption for the LiveControls.LiveHyperLink control.

[Visual Basic]
Overrides Public Property Text As String
[C#]
public override string Text {get; set;}

Property Value

The text caption for the LiveControls.LiveHyperLink control. The default value is String.Empty.

Remarks

The LiveControls.LiveHyperLink control can be displayed as text or an image. Use the Text property to specify the text to display for the LiveControls.LiveHyperLink control.

If both the Text and LiveHyperLink.ImageUrl properties are set, the LiveHyperLink.ImageUrl property takes precedence. If the image is unavailable, the text in the Text property is displayed. In browsers that support ToolTip functionality, the Text property also becomes the WebControl.ToolTip.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink Methods

The methods of the LiveHyperLink class are listed below. For a complete list of LiveHyperLink class members, see the LiveHyperLink Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveHyperLink Class | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.IPostBackEventHandler.RaisePostBackEvent Method

[Visual Basic]
Sub RaisePostBackEvent( _
   ByVal eventArgument As String _
) Implements _
   IPostBackEventHandler.RaisePostBackEvent
[C#]
void IPostBackEventHandler.RaisePostBackEvent(
   string eventArgument
);

Implements

IPostBackEventHandler.RaisePostBackEvent

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink Events

The events of the LiveHyperLink class are listed below. For a complete list of LiveHyperLink class members, see the LiveHyperLink Members topic.

Public Instance Events

Click | Occurs when the LiveControls.LiveHyperLink control is clicked.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveHyperLink Class | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.Click Event

Occurs when the LiveControls.LiveHyperLink control is clicked.

[Visual Basic]
Public Event Click As EventHandler
[C#]
public event EventHandler Click;

Remarks

The Click event fires when the left mouse button is clicked.

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveHyperLink.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveHyperLink Class | LiveHyperLink Members | Dart.PowerWEB.LiveControls Namespace


LiveImage Class

Displays an image on a Web page.

For a list of all members of this type, see LiveImage Members.

System.Object
Control
WebControl
Image
LiveImage

[Visual Basic]
Public Class LiveImage
Inherits Image
Implements ILiveControl, ILiveWebControl, IPostBackEventHandler, ILiveCallbackHandler
[C#]
public class LiveImage : Image, ILiveControl, ILiveWebControl, IPostBackEventHandler, ILiveCallbackHandler

Remarks

Use the LiveImage control to display an image on the Web page. The path to the displayed image is specified by setting the LiveImage.ImageUrl property. You can specify the text to display in place of image when the image is not available by setting the LiveImage.AlternateText property. The alignment of the image in relation to other elements on the Web page is specified by setting LiveImage.ImageAlign property.

Example

[Visual Basic, C#] The following example demonstrates adding items to a Live List control from a database, as well as updating a LiveImage control.

[Visual Basic]
'In this example, items are added to a Live List control from a database
'The items are images to be displayed in a LiveImage
'When one of the items is selected, the corresponding image is displayed
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Make sure that System.Data.OleDb is used

    'Get Items from a Database "images.mdb" in the folder "database"
    'The table is called "Table1" and the column with the filenames is "filename"
    Dim connection As New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"))
    Dim sql As String = "SELECT filename FROM Table1"
    Dim adapter As New OleDbDataAdapter(sql, connection)
    Dim dataSet As New DataSet("imagesDataSet")
    adapter.Fill(DataSet, "images")

    'Bind the database to the Live List
    LiveList1.DataSource = DataSet
    LiveList1.DataMember = "images"
    LiveList1.DataTextField = "filename"
    LiveList1.DataBind()

    'Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveList1.SelectedIndex = 0
    LiveList1_SelectedIndexChanged(Me, Nothing)
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles     LiveList1.SelectedIndexChanged
    'The Live List has been populated with some image filenames
    'When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image."
    LiveImage1.ImageUrl = "images/" + LiveList1.SelectedItem.Text
End Sub
                    [C#]
//In this example, items are added to a Live List control from a database
//The items are images to be displayed in a LiveImage
//When one of the items is selected, the corresponding image is displayed
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Make sure that System.Data.OleDb is used

    //Get Items from a Database "images.mdb" in the folder "database"
    //The table is called "Table1" and the column with the filenames is "filename"
    OleDbConnection connection = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"));
    string sql = "SELECT filename FROM Table1";
    OleDbDataAdapter adapter = new OleDbDataAdapter(sql, connection);
    DataSet dataSet = new DataSet("imagesDataSet");
    adapter.Fill(dataSet, "images");

    //Bind the database to the Live List
    LiveList1.DataSource = dataSet;
    LiveList1.DataMember = "images";
    LiveList1.DataTextField = "filename";
    LiveList1.DataBind();

    //Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveList1.SelectedIndex = 0;
    LiveList1_SelectedIndexChanged(this, null);
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //The Live List has been populated with some image filenames
    //When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image.";
    LiveImage1.ImageUrl = "images/" + LiveList1.SelectedItem.Text;
}

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage Members

Public Instance Constructors

LiveImage Constructor Initializes a new instance of LiveImage.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
AlternateText | Gets or sets the alternate text displayed in the LiveControls.LiveImage control when the image is unavailable. Browsers that support the ToolTips feature display this text as a WebControl.ToolTip.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
ImageAlign | Gets or sets the alignment of the LiveControls.LiveImage control in relation to other elements on the Web page.
ImageUrl | Gets or sets the location of an image to display in the LiveControls.LiveImage control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveImage Class | Dart.PowerWEB.LiveControls Namespace


LiveImage Constructor

Initializes a new instance of LiveImage.

[Visual Basic]
Public Sub New()
[C#]
public LiveImage();

Remarks

The default constructor initializes a new instance of LiveImage.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage Properties

The properties of the LiveImage class are listed below. For a complete list of LiveImage class members, see the LiveImage Members topic.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
AlternateText | Gets or sets the alternate text displayed in the LiveControls.LiveImage control when the image is unavailable. Browsers that support the ToolTips feature display this text as a WebControl.ToolTip.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
ImageAlign | Gets or sets the alignment of the LiveControls.LiveImage control in relation to other elements on the Web page.
ImageUrl | Gets or sets the location of an image to display in the LiveControls.LiveImage control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveImage Class | Dart.PowerWEB.LiveControls Namespace


LiveImage.AccessKey Property

Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.

[Visual Basic]
Overrides Public Property AccessKey As String
[C#]
public override string AccessKey {get; set;}

Property Value

The access key for quick navigation to the LiveControl. The default value is String.Empty, which indicates that this property is not set.

Remarks

Use the AccessKey property to specify the keyboard shortcut for the LiveControl. This allows you to navigate quickly to the control by pressing the ALT key and the key for the specified character on the keyboard. For example, setting the access key of a control to the string "D" indicates that the user can navigate to the control by pressing ALT+D.

Only a single character string is allowed for the AccessKey property. If you attempt to set this property to a value that is not a null reference (Nothing in Visual Basic), String.Empty, or a single character string, an exception is thrown.

Exceptions

Exception Type | Condition
ArgumentException | The specified access key is not either a null reference (Nothing in Visual Basic), String.Empty, or a single character string.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.AlternateText Property

Gets or sets the alternate text displayed in the LiveControls.LiveImage control when the image is unavailable. Browsers that support the ToolTips feature display this text as a WebControl.ToolTip.

[Visual Basic]
Overrides Public Property AlternateText As String
[C#]
public override string AlternateText {get; set;}

Property Value

The alternate text displayed in the LiveControls.LiveImage control when the image is unavailable.

Remarks

Use this property to specify the text to display if the image specified in the LiveImage.ImageUrl property is not available. In browsers that support the ToolTips feature, this text also displays as a WebControl.ToolTip.

Example

[Visual Basic, C#] The following example demonstrates adding items to a Live List control from a database, as well as updating a LiveImage control.

[Visual Basic]
'In this example, items are added to a Live List control from a database
'The items are images to be displayed in a LiveImage
'When one of the items is selected, the corresponding image is displayed
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Make sure that System.Data.OleDb is used

    'Get Items from a Database "images.mdb" in the folder "database"
    'The table is called "Table1" and the column with the filenames is "filename"
    Dim connection As New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"))
    Dim sql As String = "SELECT filename FROM Table1"
    Dim adapter As New OleDbDataAdapter(sql, connection)
    Dim dataSet As New DataSet("imagesDataSet")
    adapter.Fill(DataSet, "images")

    'Bind the database to the Live List
    LiveList1.DataSource = DataSet
    LiveList1.DataMember = "images"
    LiveList1.DataTextField = "filename"
    LiveList1.DataBind()

    'Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveList1.SelectedIndex = 0
    LiveList1_SelectedIndexChanged(Me, Nothing)
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles     LiveList1.SelectedIndexChanged
    'The Live List has been populated with some image filenames
    'When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image."
    LiveImage1.ImageUrl = "images/" + LiveList1.SelectedItem.Text
End Sub
                    [C#]
//In this example, items are added to a Live List control from a database
//The items are images to be displayed in a LiveImage
//When one of the items is selected, the corresponding image is displayed
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Make sure that System.Data.OleDb is used

    //Get Items from a Database "images.mdb" in the folder "database"
    //The table is called "Table1" and the column with the filenames is "filename"
    OleDbConnection connection = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"));
    string sql = "SELECT filename FROM Table1";
    OleDbDataAdapter adapter = new OleDbDataAdapter(sql, connection);
    DataSet dataSet = new DataSet("imagesDataSet");
    adapter.Fill(dataSet, "images");

    //Bind the database to the Live List
    LiveList1.DataSource = dataSet;
    LiveList1.DataMember = "images";
    LiveList1.DataTextField = "filename";
    LiveList1.DataBind();

    //Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveList1.SelectedIndex = 0;
    LiveList1_SelectedIndexChanged(this, null);
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //The Live List has been populated with some image filenames
    //When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image.";
    LiveImage1.ImageUrl = "images/" + LiveList1.SelectedItem.Text;
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.ImageAlign Property

Gets or sets the alignment of the LiveControls.LiveImage control in relation to other elements on the Web page.

[Visual Basic]
Overrides Public Property ImageAlign As ImageAlign
[C#]
public override System.Web.UI.WebControls.ImageAlign ImageAlign {get; set;}

Property Value

One of the ImageAlign values. The default is NotSet.

Remarks

Use the ImageAlign property to specify or determine the alignment of the image in relation to other elements on the Web page.

Exceptions

Exception Type | Condition
ArgumentException | The specified value is not one of the ImageAlign values.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.ImageUrl Property

Gets or sets the location of an image to display in the LiveControls.LiveImage control.

[Visual Basic]
Overrides Public Property ImageUrl As String
[C#]
public override string ImageUrl {get; set;}

Property Value

The location of an image to display in the LiveControls.LiveImage control.

Remarks

Use the ImageUrl property to specify the URL of an image to display in the LiveControls.LiveImage control. You can use a relative or an absolute URL. A relative URL relates the location of the image to the location of the Web page without specifying a complete path on the server. The path is relative to the location of the Web page. This makes it easier to move the entire site to another directory on the server without updating the code. An absolute URL provides the complete path, so moving the site to another directory requires that you update the code.

Example

[Visual Basic, C#] The following example demonstrates adding items to a Live List control from a database, as well as updating a LiveImage control.

[Visual Basic]
'In this example, items are added to a Live List control from a database
'The items are images to be displayed in a LiveImage
'When one of the items is selected, the corresponding image is displayed
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Make sure that System.Data.OleDb is used

    'Get Items from a Database "images.mdb" in the folder "database"
    'The table is called "Table1" and the column with the filenames is "filename"
    Dim connection As New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"))
    Dim sql As String = "SELECT filename FROM Table1"
    Dim adapter As New OleDbDataAdapter(sql, connection)
    Dim dataSet As New DataSet("imagesDataSet")
    adapter.Fill(DataSet, "images")

    'Bind the database to the Live List
    LiveList1.DataSource = DataSet
    LiveList1.DataMember = "images"
    LiveList1.DataTextField = "filename"
    LiveList1.DataBind()

    'Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveList1.SelectedIndex = 0
    LiveList1_SelectedIndexChanged(Me, Nothing)
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles     LiveList1.SelectedIndexChanged
    'The Live List has been populated with some image filenames
    'When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image."
    LiveImage1.ImageUrl = "images/" + LiveList1.SelectedItem.Text
End Sub
                    [C#]
//In this example, items are added to a Live List control from a database
//The items are images to be displayed in a LiveImage
//When one of the items is selected, the corresponding image is displayed
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Make sure that System.Data.OleDb is used

    //Get Items from a Database "images.mdb" in the folder "database"
    //The table is called "Table1" and the column with the filenames is "filename"
    OleDbConnection connection = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"));
    string sql = "SELECT filename FROM Table1";
    OleDbDataAdapter adapter = new OleDbDataAdapter(sql, connection);
    DataSet dataSet = new DataSet("imagesDataSet");
    adapter.Fill(dataSet, "images");

    //Bind the database to the Live List
    LiveList1.DataSource = dataSet;
    LiveList1.DataMember = "images";
    LiveList1.DataTextField = "filename";
    LiveList1.DataBind();

    //Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveList1.SelectedIndex = 0;
    LiveList1_SelectedIndexChanged(this, null);
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //The Live List has been populated with some image filenames
    //When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image.";
    LiveImage1.ImageUrl = "images/" + LiveList1.SelectedItem.Text;
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage Methods

The methods of the LiveImage class are listed below. For a complete list of LiveImage class members, see the LiveImage Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveImage Class | Dart.PowerWEB.LiveControls Namespace


LiveImage.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.IPostBackEventHandler.RaisePostBackEvent Method

[Visual Basic]
Sub RaisePostBackEvent( _
   ByVal eventArgument As String _
) Implements _
   IPostBackEventHandler.RaisePostBackEvent
[C#]
void IPostBackEventHandler.RaisePostBackEvent(
   string eventArgument
);

Implements

IPostBackEventHandler.RaisePostBackEvent

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage Events

The events of the LiveImage class are listed below. For a complete list of LiveImage class members, see the LiveImage Members topic.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveImage Class | Dart.PowerWEB.LiveControls Namespace


LiveImage.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImage.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImage Class | LiveImage Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton Class

A control that displays an image and responds to mouse clicks on the image.

For a list of all members of this type, see LiveImageButton Members.

System.Object
Control
WebControl
Image
ImageButton
LiveImageButton

[Visual Basic]
Public Class LiveImageButton
Inherits ImageButton
Implements ILiveControl, ILiveWebControl, ILiveCallbackHandler
[C#]
public class LiveImageButton : ImageButton, ILiveControl, ILiveWebControl, ILiveCallbackHandler

Remarks

Use the LiveImageButton control to display an image that responds to mouse clicks.

Both the Click and Command events are raised when the LiveImageButton control is clicked.

By using the OnClick event handler, you can programmatically determine the coordinates where the image is clicked. You can then code a response, based on the values of the coordinates. Note the origin (0, 0) is located at the upper left corner of the image.

You can use the OnCommand event handler to make the LiveImageButton control behave like a command button. A command name can be associated with the control by using the CommandName property. This allows multiple LiveImageButton controls to be placed on the same Web page. The value of the CommandName property can then be programmatically identified in the OnCommand event handler to determine the appropriate action to perform when each LiveImageButton control is clicked. The CommandArgument property can also be used to pass additional information about the command, such as specifying ascending order.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton Members

Public Instance Constructors

LiveImageButton Constructor Initializes a new instance of LiveImageButton.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
AlternateText | Gets or sets the alternate text displayed in the LiveControls.LiveImage control when the image is unavailable. Browsers that support the ToolTips feature display this text as a WebControl.ToolTip.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
CausesValidation (inherited from ImageButton) | Gets or sets a value indicating whether validation is performed when the ImageButton control is clicked.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
CommandArgument (inherited from ImageButton) | Gets or sets an optional argument that provides additional information about the CommandName property.
CommandName (inherited from ImageButton) | Gets or sets the command name associated with the ImageButton control.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
ImageAlign | Gets or sets the alignment of the LiveControls.LiveImage control in relation to other elements on the Web page.
ImageUrl | Gets or sets the location of an image to display in the LiveControls.LiveImage control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

Click (inherited from ImageButton) | Occurs when the ImageButton is clicked.
Command (inherited from ImageButton) | Occurs when the ImageButton is clicked.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.
IPostBackEventHandler.RaisePostBackEvent (inherited from ImageButton) |

See Also

LiveImageButton Class | Dart.PowerWEB.LiveControls Namespace


LiveImageButton Constructor

Initializes a new instance of LiveImageButton.

[Visual Basic]
Public Sub New()
[C#]
public LiveImageButton();

Remarks

The default constructor initializes a new instance of LiveImageButton.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton Properties

The properties of the LiveImageButton class are listed below. For a complete list of LiveImageButton class members, see the LiveImageButton Members topic.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
AlternateText | Gets or sets the alternate text displayed in the LiveControls.LiveImage control when the image is unavailable. Browsers that support the ToolTips feature display this text as a WebControl.ToolTip.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
CausesValidation (inherited from ImageButton) | Gets or sets a value indicating whether validation is performed when the ImageButton control is clicked.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
CommandArgument (inherited from ImageButton) | Gets or sets an optional argument that provides additional information about the CommandName property.
CommandName (inherited from ImageButton) | Gets or sets the command name associated with the ImageButton control.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
ImageAlign | Gets or sets the alignment of the LiveControls.LiveImage control in relation to other elements on the Web page.
ImageUrl | Gets or sets the location of an image to display in the LiveControls.LiveImage control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveImageButton Class | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.AccessKey Property

Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.

[Visual Basic]
Overrides Public Property AccessKey As String
[C#]
public override string AccessKey {get; set;}

Property Value

The access key for quick navigation to the LiveControl. The default value is String.Empty, which indicates that this property is not set.

Remarks

Use the AccessKey property to specify the keyboard shortcut for the LiveControl. This allows you to navigate quickly to the control by pressing the ALT key and the key for the specified character on the keyboard. For example, setting the access key of a control to the string "D" indicates that the user can navigate to the control by pressing ALT+D.

Only a single character string is allowed for the AccessKey property. If you attempt to set this property to a value that is not a null reference (Nothing in Visual Basic), String.Empty, or a single character string, an exception is thrown.

Exceptions

Exception Type | Condition
ArgumentException | The specified access key is not either a null reference (Nothing in Visual Basic), String.Empty, or a single character string.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.AlternateText Property

Gets or sets the alternate text displayed in the LiveControls.LiveImage control when the image is unavailable. Browsers that support the ToolTips feature display this text as a WebControl.ToolTip.

[Visual Basic]
Overrides Public Property AlternateText As String
[C#]
public override string AlternateText {get; set;}

Property Value

The alternate text displayed in the LiveControls.LiveImage control when the image is unavailable.

Remarks

Use this property to specify the text to display if the image specified in the LiveImage.ImageUrl property is not available. In browsers that support the ToolTips feature, this text also displays as a WebControl.ToolTip.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.ImageAlign Property

Gets or sets the alignment of the LiveControls.LiveImage control in relation to other elements on the Web page.

[Visual Basic]
Overrides Public Property ImageAlign As ImageAlign
[C#]
public override System.Web.UI.WebControls.ImageAlign ImageAlign {get; set;}

Property Value

One of the ImageAlign values. The default is NotSet.

Remarks

Use the ImageAlign property to specify or determine the alignment of the image in relation to other elements on the Web page.

Exceptions

Exception Type | Condition
ArgumentException | The specified value is not one of the ImageAlign values.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.ImageUrl Property

Gets or sets the location of an image to display in the LiveControls.LiveImage control.

[Visual Basic]
Overrides Public Property ImageUrl As String
[C#]
public override string ImageUrl {get; set;}

Property Value

The location of an image to display in the LiveControls.LiveImage control.

Remarks

Use the ImageUrl property to specify the URL of an image to display in the LiveControls.LiveImage control. You can use a relative or an absolute URL. A relative URL relates the location of the image to the location of the Web page without specifying a complete path on the server. The path is relative to the location of the Web page. This makes it easier to move the entire site to another directory on the server without updating the code. An absolute URL provides the complete path, so moving the site to another directory requires that you update the code.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton Methods

The methods of the LiveImageButton class are listed below. For a complete list of LiveImageButton class members, see the LiveImageButton Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.
IPostBackEventHandler.RaisePostBackEvent (inherited from ImageButton) |

See Also

LiveImageButton Class | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.IPostBackDataHandler.LoadPostData Method

When implemented by a class, processes post back data for an ASP.NET server control.

[Visual Basic]
Function LoadPostData( _
   ByVal postDataKey As String, _
   ByVal postCollection As NameValueCollection _
) As Boolean Implements _
   IPostBackDataHandler.LoadPostData
[C#]
new bool IPostBackDataHandler.LoadPostData(
   string postDataKey,
   NameValueCollection postCollection
);

Parameters

postDataKey
The key identifier for the control.
postCollection
The collection of all incoming name values.

Implements

IPostBackDataHandler.LoadPostData

Remarks

The Web Forms page framework tracks all the server control's that return true to this method call, then invokes the IPostBackDataHandler.RaisePostDataChangedEvent on those controls.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.IPostBackDataHandler.RaisePostDataChangedEvent Method

When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

[Visual Basic]
Sub RaisePostDataChangedEvent() Implements _
   IPostBackDataHandler.RaisePostDataChangedEvent
[C#]
new void IPostBackDataHandler.RaisePostDataChangedEvent();

Implements

IPostBackDataHandler.RaisePostDataChangedEvent

Remarks

Change events for the server control that implements this interface, if any, are raised from this method.

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton Events

The events of the LiveImageButton class are listed below. For a complete list of LiveImageButton class members, see the LiveImageButton Members topic.

Public Instance Events

Click (inherited from ImageButton) | Occurs when the ImageButton is clicked.
Command (inherited from ImageButton) | Occurs when the ImageButton is clicked.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveImageButton Class | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveImageButton.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveImageButton Class | LiveImageButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel Class

Represents a label control, which displays text on a Web page.

For a list of all members of this type, see LiveLabel Members.

System.Object
Control
WebControl
Label
LiveLabel

[Visual Basic]
Public Class LiveLabel
Inherits Label
Implements ILiveControl, ILiveWebControl, IPostBackEventHandler, ILiveCallbackHandler
[C#]
public class LiveLabel : Label, ILiveControl, ILiveWebControl, IPostBackEventHandler, ILiveCallbackHandler

Remarks

Use the LiveLabel control to display text in a set location on the page. Unlike static text, you can customize the displayed text through the LiveLabel.Text property.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel Members

Public Instance Constructors

LiveLabel Constructor Initializes a new instance of LiveLabel.

Public Instance Properties

AccessKey (inherited from WebControl) | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the Web server control.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text content of the LiveControls.LiveLabel control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveLabel Class | Dart.PowerWEB.LiveControls Namespace


LiveLabel Constructor

Initializes a new instance of LiveLabel.

[Visual Basic]
Public Sub New()
[C#]
public LiveLabel();

Remarks

The default constructor initializes a new instance of LiveLabel.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel Properties

The properties of the LiveLabel class are listed below. For a complete list of LiveLabel class members, see the LiveLabel Members topic.

Public Instance Properties

AccessKey (inherited from WebControl) | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the Web server control.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text content of the LiveControls.LiveLabel control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveLabel Class | Dart.PowerWEB.LiveControls Namespace


LiveLabel.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.Text Property

Gets or sets the text content of the LiveControls.LiveLabel control.

[Visual Basic]
Overrides Public Property Text As String
[C#]
public override string Text {get; set;}

Property Value

The text content of the control. The default value is String.Empty.

Remarks

Use the Text property to specify or determine the text content of the LiveControls.LiveLabel control. This property is commonly used to programmatically customize the text that is displayed in the LiveControls.LiveLabel control.

Note Setting the Text property will clear any other controls contained in the LiveControls.LiveLabel control.

CAUTION This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. ASP.NET provides an input request validation feature to block script and HTML in user input. Validation server controls are also provided to assess user input. For more information, see Validation Server Controls.

Example

[Visual Basic, C#] The following example demonstrates adding items to a Live List control dynamically, as well as updating a LiveLabel control.

[Visual Basic]
'In this example, items are added to a Live List control dynamically
'The items are simply reflections of when they were added
'When one of the items is selected, a LiveLabel is updated
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Add items dynamically in code to a list control
    'When the LiveButton is pressed, a new item is added to the list
    LiveList1.Items.Add(DateTime.Now.ToString())
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveList1.SelectedIndexChanged
    'A LiveLabel is updated whenever an item is selected from the list
    LiveLabel1.Text = "This item was added at " + LiveList1.Items(LiveList1.SelectedIndex).ToString()
End Sub
                    [C#]
//In this example, items are added to a Live List control dynamically
//The items are simply reflections of when they were added
//When one of the items is selected, a LiveLabel is updated
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Add items dynamically in code to a list control
    //When the LiveButton is pressed, a new item is added to the list
    LiveList1.Items.Add(DateTime.Now.ToString());
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //A LiveLabel is updated whenever an item is selected from the list
    LiveLabel1.Text = "This item was added at " + LiveList1.Items[LiveList1.SelectedIndex];
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel Methods

The methods of the LiveLabel class are listed below. For a complete list of LiveLabel class members, see the LiveLabel Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveLabel Class | Dart.PowerWEB.LiveControls Namespace


LiveLabel.GetCallbackEventReference Method

Returns JavaScript that can be used to initiate a callback to the server.

[Visual Basic]
Public Function GetCallbackEventReference( _
   ByVal eventName As String, _
   ByVal argument As String _
) As String
[C#]
public string GetCallbackEventReference(
   string eventName,
   string argument
);

Parameters

eventName
The event corresponding to the callback.
argument
The event arguments for the callback.

Remarks

Returns JavaScript that can be used to initiate a callback to the server.

The settings of the LiveControl (blocking, errorhandling, etc) are automatically taken into account.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.IPostBackEventHandler.RaisePostBackEvent Method

[Visual Basic]
Sub RaisePostBackEvent( _
   ByVal eventArgument As String _
) Implements _
   IPostBackEventHandler.RaisePostBackEvent
[C#]
void IPostBackEventHandler.RaisePostBackEvent(
   string eventArgument
);

Implements

IPostBackEventHandler.RaisePostBackEvent

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel Events

The events of the LiveLabel class are listed below. For a complete list of LiveLabel class members, see the LiveLabel Members topic.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveLabel Class | Dart.PowerWEB.LiveControls Namespace


LiveLabel.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLabel.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLabel Class | LiveLabel Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton Class

Displays a hyperlink style button control on a Web page.

For a list of all members of this type, see LiveLinkButton Members.

System.Object
Control
WebControl
LinkButton
LiveLinkButton

[Visual Basic]
Public Class LiveLinkButton
Inherits LinkButton
Implements ILiveControl, ILiveWebControl, ILiveCallbackHandler
[C#]
public class LiveLinkButton : LinkButton, ILiveControl, ILiveWebControl, ILiveCallbackHandler

Remarks

Use the LiveLinkButton control to create a hyperlink style button on the Web page. The LiveLinkButton control has the same appearance as a LiveControls.LiveHyperLink control, but has the same functionality as a LiveControls.LiveButton control. If you want to link to another Web page when the control is clicked, consider using the LiveControls.LiveHyperLink control.

You can create either a submit button or a command button. A submit button does not have a command name associated with it. The button simply posts the Web page back to the server. By default, a LiveLinkButton control is a submit button. You can provide an event handler for the Click event to programmatically control the actions performed when the submit button is clicked. On the other hand, a command button has a command name associated with the button, such as Sort. Set the CommandName property to specify the command name. This allows you to create multiple LiveLinkButton controls on a Web page and programmatically determine which LiveLinkButton control is clicked. You can also use the CommandArgument property with a command button to provide additional information about the command to perform, such as specifying ascending order. You can also provide an event handler for the Command event to programmatically control the action performed when the command button is clicked.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton Members

Public Instance Constructors

LiveLinkButton Constructor Initializes a new instance of LiveLinkButton.

Public Instance Properties

AccessKey (inherited from WebControl) | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the Web server control.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
CausesValidation (inherited from LinkButton) | Gets or sets a value indicating whether validation is performed when the LinkButton control is clicked.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
CommandArgument (inherited from LinkButton) | Gets or sets an optional argument passed to the Command event handler along with the associated CommandName property.
CommandName (inherited from LinkButton) | Gets or sets the command name associated with the LinkButton control. This value is passed to the Command event handler along with the CommandArgument property.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text caption displayed on the LiveControls.LiveLinkButton control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

Click (inherited from LinkButton) | Occurs when the LinkButton control is clicked.
Command (inherited from LinkButton) | Occurs when the Button control is clicked.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveLinkButton Class | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton Constructor

Initializes a new instance of LiveLinkButton.

[Visual Basic]
Public Sub New()
[C#]
public LiveLinkButton();

Remarks

The default constructor initializes a new instance of LiveLinkButton.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton Properties

The properties of the LiveLinkButton class are listed below. For a complete list of LiveLinkButton class members, see the LiveLinkButton Members topic.

Public Instance Properties

AccessKey (inherited from WebControl) | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the Web server control.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
CausesValidation (inherited from LinkButton) | Gets or sets a value indicating whether validation is performed when the LinkButton control is clicked.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
CommandArgument (inherited from LinkButton) | Gets or sets an optional argument passed to the Command event handler along with the associated CommandName property.
CommandName (inherited from LinkButton) | Gets or sets the command name associated with the LinkButton control. This value is passed to the Command event handler along with the CommandArgument property.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text caption displayed on the LiveControls.LiveLinkButton control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveLinkButton Class | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.Text Property

Gets or sets the text caption displayed on the LiveControls.LiveLinkButton control.

[Visual Basic]
Overrides Public Property Text As String
[C#]
public override string Text {get; set;}

Property Value

The text caption displayed on the LiveControls.LiveLinkButton control. The default value is String.Empty.

Remarks

Use the Text property to specify or determine the caption to display on the LiveControls.LiveLinkButton control.

CAUTION This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. ASP.NET provides an input request validation feature to block script and HTML in user input. Validation server controls are also provided to assess user input. For more information, see Validation Server Controls.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton Methods

The methods of the LiveLinkButton class are listed below. For a complete list of LiveLinkButton class members, see the LiveLinkButton Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveLinkButton Class | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.GetCallbackEventReference Method

Returns JavaScript that can be used to initiate a callback to the server.

[Visual Basic]
Public Function GetCallbackEventReference( _
   ByVal eventName As String, _
   ByVal argument As String _
) As String
[C#]
public string GetCallbackEventReference(
   string eventName,
   string argument
);

Parameters

eventName
The event corresponding to the callback.
argument
The event arguments for the callback.

Remarks

Returns JavaScript that can be used to initiate a callback to the server.

The settings of the LiveControl (blocking, errorhandling, etc) are automatically taken into account.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.IPostBackEventHandler.RaisePostBackEvent Method

[Visual Basic]
Sub RaisePostBackEvent( _
   ByVal eventArgument As String _
) Implements _
   IPostBackEventHandler.RaisePostBackEvent
[C#]
new void IPostBackEventHandler.RaisePostBackEvent(
   string eventArgument
);

Implements

IPostBackEventHandler.RaisePostBackEvent

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton Events

The events of the LiveLinkButton class are listed below. For a complete list of LiveLinkButton class members, see the LiveLinkButton Members topic.

Public Instance Events

Click (inherited from LinkButton) | Occurs when the LinkButton control is clicked.
Command (inherited from LinkButton) | Occurs when the Button control is clicked.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveLinkButton Class | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveLinkButton.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveLinkButton Class | LiveLinkButton Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox Class

Represents a list box control that allows single or multiple item selection.

For a list of all members of this type, see LiveListBox Members.

System.Object
Control
WebControl
ListControl
ListBox
LiveListBox

[Visual Basic]
Public Class LiveListBox
Inherits ListBox
Implements ILiveControl, ILiveWebControl, ILiveCallbackHandler
[C#]
public class LiveListBox : ListBox, ILiveControl, ILiveWebControl, ILiveCallbackHandler

Remarks

Use the LiveListBox control to create a list control that allows single or multiple item selection. To enable multiple item selection, set the LiveListBox.SelectionMode property to ListSelectionMode.Multiple.

Example

[Visual Basic, C#] The following example demonstrates different ways of adding items to a Live List control.

[Visual Basic]
'In the following examples, items are added to all four types of Live List controls
'These include the LiveListBox, LiveDropDownList, LiveRadioButtonList and LiveCheckBoxList
'Each Live List control can be interchanged with another

'Add items using an ArrayList, and show a LiveMessageBox when an item is selected

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Create a new ArrayList with the items to add to the Live list control
    Dim arrayItems As New ArrayList()
    arrayItems.Add("Alert")
    arrayItems.Add("Confirm")
    arrayItems.Add("Prompt")

    'Set the data source to the ArrayList and bind it to the Live list control
    LiveRadioButtonList1.DataSource = arrayItems
    LiveRadioButtonList1.DataBind()
End Sub

Private Sub LiveRadioButtonList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveRadioButtonList1.SelectedIndexChanged
    'When a type of MessageBox is selected from the list, show it
    Select Case (LiveRadioButtonList1.SelectedIndex)
    Case 0
        LiveMessageBox1.Show("You have selected 'Alert'", DialogType.Alert)
        Case 1
        LiveMessageBox1.Show("You have selected 'Confirm'", DialogType.Confirm)
        Case 2
        LiveMessageBox1.Show("You have selected 'Prompt'", DialogType.Prompt)
        Case Else
    End Select
End Sub

Private Sub LiveMessageBox1_Response(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.ResponseEventArgs) Handles LiveMessageBox1.Response
    'After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    'If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    If (e.DialogType = DialogType.Confirm) Then
        If (e.Confirmed) Then
        LiveTextBox1.Text = "The OK button was pressed"
        Else
        LiveTextBox1.Text = "The Cancel button was pressed"
        End If

        'If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    ElseIf (e.DialogType = DialogType.Prompt) Then
        If (Not e.Confirmed) Then
        LiveTextBox1.Text = "The Prompt was cancelled"
        Else
        LiveTextBox1.Text = "The inputted data was: " + e.Text
        End If
    End If
End Sub

'Add items dynamically, when a LiveButton is pressed

Private Sub LiveButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton2.Click
    'Add items dynamically in code to a list control
    'When the LiveButton is pressed, a new item is added to the list
    LiveListBox1.Items.Add(DateTime.Now.ToString())
End Sub

Private Sub LiveListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveListBox1.SelectedIndexChanged
    'A LiveLabel is updated whenever an item is selected from the list
    LiveLabel1.Text = "This item was added at " + LiveListBox1.Items(LiveListBox1.SelectedIndex).ToString()
End Sub

'Add items from a database, and display an image when an item is selected

Private Sub LiveButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton3.Click
    'Make sure that System.Data.OleDb is used

    'Get Items from a Database "images.mdb" in the folder "database"
    'The table is called "Table1" and the column with the filenames is "filename"
    Dim connection As New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"))
    Dim sql As String = "SELECT filename FROM Table1"
    Dim adapter As New OleDbDataAdapter(sql, connection)
    Dim dataSet As New DataSet("imagesDataSet")
    adapter.Fill(dataSet, "images")

    'Bind the database to the Live List
    LiveDropDownList1.DataSource = dataSet
    LiveDropDownList1.DataMember = "images"
    LiveDropDownList1.DataTextField = "filename"
    LiveDropDownList1.DataBind()

    'Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveDropDownList1.SelectedIndex = 0
    LiveDropDownList1_SelectedIndexChanged(Me, Nothing)
End Sub

Private Sub LiveDropDownList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveDropDownList1.SelectedIndexChanged
    'The Live List has been populated with some image filenames
    'When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image."
    LiveImage1.ImageUrl = "images/" + LiveDropDownList1.SelectedItem.Text
End Sub

'Add items to the Items.Collection and play a sound when an item is selected

Private Sub LiveButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton4.Click
    'Add items to the Live list control via the ListItemCollection
    LiveCheckBoxList1.Items.Add("chord.wav")
    LiveCheckBoxList1.Items.Add("chimes.wav")
    LiveCheckBoxList1.Items.Add("exclamation.wav")
    LiveCheckBoxList1.Items.Add("error.wav")
End Sub

Private Sub LiveCheckBoxList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveCheckBoxList1.SelectedIndexChanged
    'When an item in the LiveCheckBoxList is selected or de-selected
    'The selected sound that is topmost in the list will play
    If (LiveCheckBoxList1.SelectedIndex > -1) Then
        LiveSound1.Source = "sounds/" + LiveCheckBoxList1.Items(LiveCheckBoxList1.SelectedIndex).ToString()
        LiveSound1.Play()
    End If
End Sub
                    [C#]
//In the following examples, items are added to all four types of Live List controls
//These include the LiveListBox, LiveDropDownList, LiveRadioButtonList and LiveCheckBoxList
//Each Live List control can be interchanged with another

//Add items using an ArrayList, and show a LiveMessageBox when an item is selected

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Create a new ArrayList with the items to add to the Live list control
    ArrayList arrayItems = new ArrayList();
    arrayItems.Add("Alert");
    arrayItems.Add("Confirm");
    arrayItems.Add("Prompt");

    //Set the data source to the ArrayList and bind it to the Live list control
    LiveRadioButtonList1.DataSource = arrayItems;
    LiveRadioButtonList1.DataBind();
}

private void LiveRadioButtonList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When a type of MessageBox is selected from the list, show it
    switch (LiveRadioButtonList1.SelectedIndex)
    {
        case 0:
            LiveMessageBox1.Show("You have selected 'Alert'!", DialogType.Alert);
            break;
        case 1:
            LiveMessageBox1.Show("You have selected 'Confirm'!", DialogType.Confirm);
            break;
        case 2:
            LiveMessageBox1.Show("You have selected 'Prompt'!", DialogType.Prompt);
            break;
        default:
            break;
    }
}

private void LiveMessageBox1_Response(object sender, Dart.PowerWEB.LiveControls.ResponseEventArgs e)
{
    //After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    //If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    if (e.DialogType == DialogType.Confirm)
    {
        if (e.Confirmed)
            LiveTextBox1.Text = "The OK button was pressed!";
        else
            LiveTextBox1.Text = "The Cancel button was pressed!";
    }
    //If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    else if (e.DialogType == DialogType.Prompt)
    {
        if (!e.Confirmed)
            LiveTextBox1.Text = "The Prompt was cancelled!";
        else
            LiveTextBox1.Text = "The inputted data was: " + e.Text;
    }
}

//Add items dynamically, when a LiveButton is pressed

private void LiveButton2_Click(object sender, System.EventArgs e)
{
    //Add items dynamically in code to a list control
    //When the LiveButton is pressed, a new item is added to the list
    LiveListBox1.Items.Add(DateTime.Now.ToString());
}

private void LiveListBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //A LiveLabel is updated whenever an item is selected from the list
    LiveLabel1.Text = "This item was added at " + LiveListBox1.Items[LiveListBox1.SelectedIndex];
}

//Add items from a database, and display an image when an item is selected

private void LiveButton3_Click(object sender, System.EventArgs e)
{
    //Make sure that System.Data.OleDb is used

    //Get Items from a Database "images.mdb" in the folder "database"
    //The table is called "Table1" and the column with the filenames is "filename"
    OleDbConnection connection = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"));
    string sql = "SELECT filename FROM Table1";
    OleDbDataAdapter adapter = new OleDbDataAdapter(sql, connection);
    DataSet dataSet = new DataSet("imagesDataSet");
    adapter.Fill(dataSet, "images");

    //Bind the database to the Live List
    LiveDropDownList1.DataSource = dataSet;
    LiveDropDownList1.DataMember = "images";
    LiveDropDownList1.DataTextField = "filename";
    LiveDropDownList1.DataBind();

    //Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveDropDownList1.SelectedIndex = 0;
    LiveDropDownList1_SelectedIndexChanged(this, null);
}

private void LiveDropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //The Live List has been populated with some image filenames
    //When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image.";
    LiveImage1.ImageUrl = "images/" + LiveDropDownList1.SelectedItem.Text;
}

//Add items to the Items.Collection and play a sound when an item is selected

private void LiveButton4_Click(object sender, System.EventArgs e)
{
    //Add items to the Live list control via the ListItemCollection
    LiveCheckBoxList1.Items.Add("chord.wav");
    LiveCheckBoxList1.Items.Add("chimes.wav");
    LiveCheckBoxList1.Items.Add("exclamation.wav");
    LiveCheckBoxList1.Items.Add("error.wav");
}

private void LiveCheckBoxList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When an item in the LiveCheckBoxList is selected or de-selected
    //The selected sound that is topmost in the list will play
    if (LiveCheckBoxList1.SelectedIndex > -1)
    {
        LiveSound1.Source = "sounds/" + LiveCheckBoxList1.Items[LiveCheckBoxList1.SelectedIndex];
        LiveSound1.Play();
    }
}

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox Members

Public Instance Constructors

LiveListBox Constructor Initializes a new instance of LiveListBox.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataMember (inherited from ListControl) | Gets or sets the specific table in the DataSource to bind to the control.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
DataSource (inherited from ListControl) | Gets or sets the data source that populates the items of the list control.
DataTextField (inherited from ListControl) | Gets or sets the field of the data source that provides the text content of the list items.
DataTextFormatString (inherited from ListControl) | Gets or sets the formatting string used to control how data bound to the list control is displayed.
DataValueField (inherited from ListControl) | Gets or sets the field of the data source that provides the value of each list item.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Items (inherited from ListControl) | Gets the collection of items in the list control.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
Rows | Obsolete. Gets the number of rows displayed in the LiveControls.LiveListBox control.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
SelectedIndex | Gets or sets the lowest ordinal index of the selected items in the list.
SelectedItem (inherited from ListControl) | Gets the selected item with the lowest index in the list control.
SelectionMode | Gets or sets the selection mode of the LiveControls.LiveListBox control.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
ClearSelection (inherited from ListControl) |
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
SelectedIndexChanged (inherited from ListControl) | Occurs when the selection on the list changes and is posted back to the server.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

See Also

LiveListBox Class | Dart.PowerWEB.LiveControls Namespace


LiveListBox Constructor

Initializes a new instance of LiveListBox.

[Visual Basic]
Public Sub New()
[C#]
public LiveListBox();

Remarks

The default constructor initializes a new instance of LiveListBox.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox Properties

The properties of the LiveListBox class are listed below. For a complete list of LiveListBox class members, see the LiveListBox Members topic.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataMember (inherited from ListControl) | Gets or sets the specific table in the DataSource to bind to the control.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
DataSource (inherited from ListControl) | Gets or sets the data source that populates the items of the list control.
DataTextField (inherited from ListControl) | Gets or sets the field of the data source that provides the text content of the list items.
DataTextFormatString (inherited from ListControl) | Gets or sets the formatting string used to control how data bound to the list control is displayed.
DataValueField (inherited from ListControl) | Gets or sets the field of the data source that provides the value of each list item.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Items (inherited from ListControl) | Gets the collection of items in the list control.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
Rows | Obsolete. Gets the number of rows displayed in the LiveControls.LiveListBox control.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
SelectedIndex | Gets or sets the lowest ordinal index of the selected items in the list.
SelectedItem (inherited from ListControl) | Gets the selected item with the lowest index in the list control.
SelectionMode | Gets or sets the selection mode of the LiveControls.LiveListBox control.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveListBox Class | Dart.PowerWEB.LiveControls Namespace


LiveListBox.AccessKey Property

Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.

[Visual Basic]
Overrides Public Property AccessKey As String
[C#]
public override string AccessKey {get; set;}

Property Value

The access key for quick navigation to the LiveControl. The default value is String.Empty, which indicates that this property is not set.

Remarks

Use the AccessKey property to specify the keyboard shortcut for the LiveControl. This allows you to navigate quickly to the control by pressing the ALT key and the key for the specified character on the keyboard. For example, setting the access key of a control to the string "D" indicates that the user can navigate to the control by pressing ALT+D.

Only a single character string is allowed for the AccessKey property. If you attempt to set this property to a value that is not a null reference (Nothing in Visual Basic), String.Empty, or a single character string, an exception is thrown.

Exceptions

Exception Type | Condition
ArgumentException | The specified access key is not either a null reference (Nothing in Visual Basic), String.Empty, or a single character string.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.AutoPostBack Property

Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.

[Visual Basic]
Overrides Public Property AutoPostBack As Boolean
[C#]
public override bool AutoPostBack {get; set;}

Property Value

true whenever the user changes the text in the text box and then tabs out of the control; otherwise, false. The default is true, which is different than the non-Live TextBox.

Remarks

For Live List Controls, set this property to true if the server needs to capture the change as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's selection from the list control. This property can be used to allow automatic population of other controls on the Web page based on a user's selection from the list.

For LiveCheckBox and LiveRadioButton, use this property to specify whether the state of the LiveControl is posted back to the server when clicked.

Note When AutoPostBack is true and ILiveCallbackHandler.EnableCallback is true, the LiveControl will perform automatic callbacks. If ILiveCallbackHandler.EnableCallback is false, traditional postbacks will occur.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.Rows Property

Obsolete. Gets the number of rows displayed in the LiveControls.LiveListBox control.

[Visual Basic]
Overrides Public Property Rows As Integer
[C#]
public override int Rows {get; set;}

Property Value

The number of rows displayed in the LiveControls.LiveListBox control.

Remarks

This property should not be used, as it does not have to be accurate. Instead, use ListItemCollection.Count to learn the number of rows in the LiveControls.LiveListBox.

Note The behavior of Rows is different than the non-Live ListBox. This property cannot be set.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.SelectedIndex Property

Gets or sets the lowest ordinal index of the selected items in the list.

[Visual Basic]
Overrides Public Property SelectedIndex As Integer
[C#]
public override int SelectedIndex {get; set;}

Property Value

The lowest ordinal index of the selected items in the list. The default is -1, which indicates that nothing is selected.

Remarks

Use this property to determine the index of the currently selected item in the list if the list control allows only one selection. If the list control supports multiple selections, use this property to determine the lowest index of the selected items.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The index was set to less than -1, or greater than or equal to the number of items on the list.

Example

[Visual Basic, C#] The following example demonstrates adding items to a Live List control dynamically, as well as updating a LiveLabel control.

[Visual Basic]
'In this example, items are added to a Live List control dynamically
'The items are simply reflections of when they were added
'When one of the items is selected, a LiveLabel is updated
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Add items dynamically in code to a list control
    'When the LiveButton is pressed, a new item is added to the list
    LiveList1.Items.Add(DateTime.Now.ToString())
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveList1.SelectedIndexChanged
    'A LiveLabel is updated whenever an item is selected from the list
    LiveLabel1.Text = "This item was added at " + LiveList1.Items(LiveList1.SelectedIndex).ToString()
End Sub
                    [C#]
//In this example, items are added to a Live List control dynamically
//The items are simply reflections of when they were added
//When one of the items is selected, a LiveLabel is updated
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Add items dynamically in code to a list control
    //When the LiveButton is pressed, a new item is added to the list
    LiveList1.Items.Add(DateTime.Now.ToString());
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //A LiveLabel is updated whenever an item is selected from the list
    LiveLabel1.Text = "This item was added at " + LiveList1.Items[LiveList1.SelectedIndex];
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.SelectionMode Property

Gets or sets the selection mode of the LiveControls.LiveListBox control.

[Visual Basic]
Overrides Public Property SelectionMode As ListSelectionMode
[C#]
public override System.Web.UI.WebControls.ListSelectionMode SelectionMode {get; set;}

Property Value

One of the ListSelectionMode values. The default value is Single.

Remarks

Use the SelectionMode property to specify the mode behavior of the LiveControls.LiveListBox control. Setting this property to ListSelectionMode.Single indicates only a single item can be selected from the LiveControls.LiveListBox control, while ListSelectionMode.Multiple specifies multiple items can be selected.

Exceptions

Exception Type | Condition
ArgumentException | The specified selection mode is not one of the ListSelectionMode values.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox Methods

The methods of the LiveListBox class are listed below. For a complete list of LiveListBox class members, see the LiveListBox Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
ClearSelection (inherited from ListControl) |
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

See Also

LiveListBox Class | Dart.PowerWEB.LiveControls Namespace


LiveListBox.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.IPostBackDataHandler.LoadPostData Method

When implemented by a class, processes post back data for an ASP.NET server control.

[Visual Basic]
Function LoadPostData( _
   ByVal postDataKey As String, _
   ByVal postCollection As NameValueCollection _
) As Boolean Implements _
   IPostBackDataHandler.LoadPostData
[C#]
new bool IPostBackDataHandler.LoadPostData(
   string postDataKey,
   NameValueCollection postCollection
);

Parameters

postDataKey
The key identifier for the control.
postCollection
The collection of all incoming name values.

Implements

IPostBackDataHandler.LoadPostData

Remarks

The Web Forms page framework tracks all the server control's that return true to this method call, then invokes the IPostBackDataHandler.RaisePostDataChangedEvent on those controls.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.IPostBackDataHandler.RaisePostDataChangedEvent Method

When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

[Visual Basic]
Sub RaisePostDataChangedEvent() Implements _
   IPostBackDataHandler.RaisePostDataChangedEvent
[C#]
new void IPostBackDataHandler.RaisePostDataChangedEvent();

Implements

IPostBackDataHandler.RaisePostDataChangedEvent

Remarks

Change events for the server control that implements this interface, if any, are raised from this method.

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox Events

The events of the LiveListBox class are listed below. For a complete list of LiveListBox class members, see the LiveListBox Members topic.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
SelectedIndexChanged (inherited from ListControl) | Occurs when the selection on the list changes and is posted back to the server.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveListBox Class | Dart.PowerWEB.LiveControls Namespace


LiveListBox.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveListBox.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveListBox Class | LiveListBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox Class

Displays a message box that can inform or prompt the user.

For a list of all members of this type, see LiveMessageBox Members.

System.Object
Control
LiveMessageBox

[Visual Basic]
Public Class LiveMessageBox
Inherits Control
Implements ILiveControl, ILiveCallbackHandler, IPostBackEventHandler
[C#]
public class LiveMessageBox : Control, ILiveControl, ILiveCallbackHandler, IPostBackEventHandler

Remarks

Use LiveMessageBox.Show to inform the user, ask the user for confirmation, or prompt the user for information.

A LiveMessageBox.Response event will fire after the user has responded to a DialogType.Confirm or DialogType.Prompt LiveMessageBox.

Example

[Visual Basic, C#] The following example demonstrates using a LiveMessageBox in combination with a Live List control.

[Visual Basic]
'In this example, items are added to a Live List control using an ArrayList when a LiveButton is pressed
'The items include different LiveMessageBox Dialog Types
'When one of the Types is selected in the List, the MessageBox is shown
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Create a new ArrayList with the items to add to the Live list control
    Dim arrayItems As New ArrayList()
    arrayItems.Add("Alert")
    arrayItems.Add("Confirm")
    arrayItems.Add("Prompt")

    'Set the data source to the ArrayList and bind it to the Live list control
    LiveList1.DataSource = arrayItems
    LiveList1.DataBind()
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveList1.SelectedIndexChanged
    'When a type of MessageBox is selected from the list, show it
    Select Case (LiveList1.SelectedIndex)
        Case 0
            LiveMessageBox1.Show("You have selected 'Alert'!", DialogType.Alert)
        Case 1
            LiveMessageBox1.Show("You have selected 'Confirm'!", DialogType.Confirm)
        Case 2
            LiveMessageBox1.Show("You have selected 'Prompt'!", DialogType.Prompt)
        Case Else
    End Select
End Sub

Private Sub LiveMessageBox1_Response(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.ResponseEventArgs) Handles LiveMessageBox1.Response
    'After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    'If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    If (e.DialogType = DialogType.Confirm) Then

        If (e.Confirmed) Then
            LiveTextBox1.Text = "The OK button was pressed!"
        Else
            LiveTextBox1.Text = "The Cancel button was pressed!"
        End If

    'If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    ElseIf (e.DialogType = DialogType.Prompt) Then
        If (Not e.Confirmed) Then
            LiveTextBox1.Text = "The Prompt was cancelled!"
        Else
            LiveTextBox1.Text = "The inputted data was: " + e.Text
        End If
    End If
End Sub
                    [C#]
//In this example, items are added to a Live List control using an ArrayList when a LiveButton is pressed
//The items include different LiveMessageBox Dialog Types
//When one of the Types is selected in the List, the MessageBox is shown
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Create a new ArrayList with the items to add to the Live list control
    ArrayList arrayItems = new ArrayList();
    arrayItems.Add("Alert");
    arrayItems.Add("Confirm");
    arrayItems.Add("Prompt");

    //Set the data source to the ArrayList and bind it to the Live list control
    LiveList1.DataSource = arrayItems;
    LiveList1.DataBind();
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When a type of MessageBox is selected from the list, show it
    switch (LiveList1.SelectedIndex)
    {
        case 0:
            LiveMessageBox1.Show("You have selected 'Alert'!", DialogType.Alert);
            break;
        case 1:
            LiveMessageBox1.Show("You have selected 'Confirm'!", DialogType.Confirm);
            break;
        case 2:
            LiveMessageBox1.Show("You have selected 'Prompt'!", DialogType.Prompt);
            break;
        default:
            break;
    }
}

private void LiveMessageBox1_Response(object sender, Dart.PowerWEB.LiveControls.ResponseEventArgs e)
{
    //After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    //If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    if (e.DialogType == DialogType.Confirm)
    {
        if (e.Confirmed)
            LiveTextBox1.Text = "The OK button was pressed!";
        else
            LiveTextBox1.Text = "The Cancel button was pressed!";
    }
    //If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    else if (e.DialogType == DialogType.Prompt)
    {
        if (!e.Confirmed)
            LiveTextBox1.Text = "The Prompt was cancelled!";
        else
            LiveTextBox1.Text = "The inputted data was: " + e.Text;
    }
}

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox Members

Public Instance Constructors

LiveMessageBox Constructor Initializes a new instance of LiveMessageBox.

Public Instance Properties

BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
EnableCallback | Gets or sets whether the control issues a callback.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible (inherited from Control) | Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.

Public Instance Methods

DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
Show | Shows a JavaScript message box.
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Response | Occurs when a response is returned from a LiveControls.LiveMessageBox of type DialogType.Prompt or DialogType.Confirm.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveMessageBox Class | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox Constructor

Initializes a new instance of LiveMessageBox.

[Visual Basic]
Public Sub New()
[C#]
public LiveMessageBox();

Remarks

The default constructor initializes a new instance of LiveMessageBox.

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox Properties

The properties of the LiveMessageBox class are listed below. For a complete list of LiveMessageBox class members, see the LiveMessageBox Members topic.

Public Instance Properties

BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
EnableCallback | Gets or sets whether the control issues a callback.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible (inherited from Control) | Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.

See Also

LiveMessageBox Class | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox Methods

The methods of the LiveMessageBox class are listed below. For a complete list of LiveMessageBox class members, see the LiveMessageBox Members topic.

Public Instance Methods

DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
Show | Shows a JavaScript message box.
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveMessageBox Class | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.Show Method

Shows a JavaScript message box.

[Visual Basic]
Public Sub Show( _
   ByVal text As String, _
   ByVal dialogType As DialogType _
)
[C#]
public void Show(
   string text,
   DialogType dialogType
);

Parameters

text
The text to show in the message box.
dialogType
The type of JavaScript message box to show.

Remarks

Shows one of three JavaScript message boxes, as specified by the DialogType parameter.

The options are Alert, Confirm and Prompt. For Confirm and Prompt types, a Response event will fire when the response is returned.

Example

[Visual Basic, C#] The following example demonstrates using a LiveMessageBox in combination with a Live List control.

[Visual Basic]
'In this example, items are added to a Live List control using an ArrayList when a LiveButton is pressed
'The items include different LiveMessageBox Dialog Types
'When one of the Types is selected in the List, the MessageBox is shown
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Create a new ArrayList with the items to add to the Live list control
    Dim arrayItems As New ArrayList()
    arrayItems.Add("Alert")
    arrayItems.Add("Confirm")
    arrayItems.Add("Prompt")

    'Set the data source to the ArrayList and bind it to the Live list control
    LiveList1.DataSource = arrayItems
    LiveList1.DataBind()
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveList1.SelectedIndexChanged
    'When a type of MessageBox is selected from the list, show it
    Select Case (LiveList1.SelectedIndex)
        Case 0
            LiveMessageBox1.Show("You have selected 'Alert'!", DialogType.Alert)
        Case 1
            LiveMessageBox1.Show("You have selected 'Confirm'!", DialogType.Confirm)
        Case 2
            LiveMessageBox1.Show("You have selected 'Prompt'!", DialogType.Prompt)
        Case Else
    End Select
End Sub

Private Sub LiveMessageBox1_Response(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.ResponseEventArgs) Handles LiveMessageBox1.Response
    'After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    'If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    If (e.DialogType = DialogType.Confirm) Then

        If (e.Confirmed) Then
            LiveTextBox1.Text = "The OK button was pressed!"
        Else
            LiveTextBox1.Text = "The Cancel button was pressed!"
        End If

    'If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    ElseIf (e.DialogType = DialogType.Prompt) Then
        If (Not e.Confirmed) Then
            LiveTextBox1.Text = "The Prompt was cancelled!"
        Else
            LiveTextBox1.Text = "The inputted data was: " + e.Text
        End If
    End If
End Sub
                    [C#]
//In this example, items are added to a Live List control using an ArrayList when a LiveButton is pressed
//The items include different LiveMessageBox Dialog Types
//When one of the Types is selected in the List, the MessageBox is shown
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Create a new ArrayList with the items to add to the Live list control
    ArrayList arrayItems = new ArrayList();
    arrayItems.Add("Alert");
    arrayItems.Add("Confirm");
    arrayItems.Add("Prompt");

    //Set the data source to the ArrayList and bind it to the Live list control
    LiveList1.DataSource = arrayItems;
    LiveList1.DataBind();
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When a type of MessageBox is selected from the list, show it
    switch (LiveList1.SelectedIndex)
    {
        case 0:
            LiveMessageBox1.Show("You have selected 'Alert'!", DialogType.Alert);
            break;
        case 1:
            LiveMessageBox1.Show("You have selected 'Confirm'!", DialogType.Confirm);
            break;
        case 2:
            LiveMessageBox1.Show("You have selected 'Prompt'!", DialogType.Prompt);
            break;
        default:
            break;
    }
}

private void LiveMessageBox1_Response(object sender, Dart.PowerWEB.LiveControls.ResponseEventArgs e)
{
    //After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    //If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    if (e.DialogType == DialogType.Confirm)
    {
        if (e.Confirmed)
            LiveTextBox1.Text = "The OK button was pressed!";
        else
            LiveTextBox1.Text = "The Cancel button was pressed!";
    }
    //If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    else if (e.DialogType == DialogType.Prompt)
    {
        if (!e.Confirmed)
            LiveTextBox1.Text = "The Prompt was cancelled!";
        else
            LiveTextBox1.Text = "The inputted data was: " + e.Text;
    }
}

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.IPostBackEventHandler.RaisePostBackEvent Method

[Visual Basic]
Sub RaisePostBackEvent( _
   ByVal eventArgument As String _
) Implements _
   IPostBackEventHandler.RaisePostBackEvent
[C#]
void IPostBackEventHandler.RaisePostBackEvent(
   string eventArgument
);

Implements

IPostBackEventHandler.RaisePostBackEvent

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox Events

The events of the LiveMessageBox class are listed below. For a complete list of LiveMessageBox class members, see the LiveMessageBox Members topic.

Public Instance Events

DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Response | Occurs when a response is returned from a LiveControls.LiveMessageBox of type DialogType.Prompt or DialogType.Confirm.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveMessageBox Class | Dart.PowerWEB.LiveControls Namespace


LiveMessageBox.Response Event

Occurs when a response is returned from a LiveControls.LiveMessageBox of type DialogType.Prompt or DialogType.Confirm.

[Visual Basic]
Public Event Response As ResponseEventHandler
[C#]
public event ResponseEventHandler Response;

Event Data

The event handler receives an argument of type ResponseEventArgs containing data related to this event. The following ResponseEventArgs properties provide information specific to this event.

Property | Description
Confirmed | Gets or sets the confirmed state of a LiveControls.LiveMessageBox.
DialogType | Gets or sets the confirmed state of a LiveControls.LiveMessageBox.
Text | Gets or sets the response message of a LiveControls.LiveMessageBox.

Remarks

The Response event fires when a response is returned from a LiveControls.LiveMessageBox of type DialogType.Prompt or DialogType.Confirm.

Example

[Visual Basic, C#] The following example demonstrates using a LiveMessageBox in combination with a Live List control.

[Visual Basic]
'In this example, items are added to a Live List control using an ArrayList when a LiveButton is pressed
'The items include different LiveMessageBox Dialog Types
'When one of the Types is selected in the List, the MessageBox is shown
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Create a new ArrayList with the items to add to the Live list control
    Dim arrayItems As New ArrayList()
    arrayItems.Add("Alert")
    arrayItems.Add("Confirm")
    arrayItems.Add("Prompt")

    'Set the data source to the ArrayList and bind it to the Live list control
    LiveList1.DataSource = arrayItems
    LiveList1.DataBind()
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveList1.SelectedIndexChanged
    'When a type of MessageBox is selected from the list, show it
    Select Case (LiveList1.SelectedIndex)
        Case 0
            LiveMessageBox1.Show("You have selected 'Alert'!", DialogType.Alert)
        Case 1
            LiveMessageBox1.Show("You have selected 'Confirm'!", DialogType.Confirm)
        Case 2
            LiveMessageBox1.Show("You have selected 'Prompt'!", DialogType.Prompt)
        Case Else
    End Select
End Sub

Private Sub LiveMessageBox1_Response(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.ResponseEventArgs) Handles LiveMessageBox1.Response
    'After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    'If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    If (e.DialogType = DialogType.Confirm) Then

        If (e.Confirmed) Then
            LiveTextBox1.Text = "The OK button was pressed!"
        Else
            LiveTextBox1.Text = "The Cancel button was pressed!"
        End If

    'If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    ElseIf (e.DialogType = DialogType.Prompt) Then
        If (Not e.Confirmed) Then
            LiveTextBox1.Text = "The Prompt was cancelled!"
        Else
            LiveTextBox1.Text = "The inputted data was: " + e.Text
        End If
    End If
End Sub
                    [C#]
//In this example, items are added to a Live List control using an ArrayList when a LiveButton is pressed
//The items include different LiveMessageBox Dialog Types
//When one of the Types is selected in the List, the MessageBox is shown
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Create a new ArrayList with the items to add to the Live list control
    ArrayList arrayItems = new ArrayList();
    arrayItems.Add("Alert");
    arrayItems.Add("Confirm");
    arrayItems.Add("Prompt");

    //Set the data source to the ArrayList and bind it to the Live list control
    LiveList1.DataSource = arrayItems;
    LiveList1.DataBind();
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When a type of MessageBox is selected from the list, show it
    switch (LiveList1.SelectedIndex)
    {
        case 0:
            LiveMessageBox1.Show("You have selected 'Alert'!", DialogType.Alert);
            break;
        case 1:
            LiveMessageBox1.Show("You have selected 'Confirm'!", DialogType.Confirm);
            break;
        case 2:
            LiveMessageBox1.Show("You have selected 'Prompt'!", DialogType.Prompt);
            break;
        default:
            break;
    }
}

private void LiveMessageBox1_Response(object sender, Dart.PowerWEB.LiveControls.ResponseEventArgs e)
{
    //After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    //If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    if (e.DialogType == DialogType.Confirm)
    {
        if (e.Confirmed)
            LiveTextBox1.Text = "The OK button was pressed!";
        else
            LiveTextBox1.Text = "The Cancel button was pressed!";
    }
    //If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    else if (e.DialogType == DialogType.Prompt)
    {
        if (!e.Confirmed)
            LiveTextBox1.Text = "The Prompt was cancelled!";
        else
            LiveTextBox1.Text = "The inputted data was: " + e.Text;
    }
}

See Also

LiveMessageBox Class | LiveMessageBox Members | Dart.PowerWEB.LiveControls Namespace


LivePanel Class

Represents a control that acts as a container for other controls.

For a list of all members of this type, see LivePanel Members.

System.Object
Control
WebControl
Panel
LivePanel

[Visual Basic]
Public Class LivePanel
Inherits Panel
Implements ILiveControl, ILiveWebControl, IPostBackEventHandler, ILiveCallbackHandler
[C#]
public class LivePanel : Panel, ILiveControl, ILiveWebControl, IPostBackEventHandler, ILiveCallbackHandler

Remarks

The LivePanel control is a container for other controls. It is especially useful when you want to generate controls programmatically or hide/show a group of controls.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel Members

Public Instance Constructors

LivePanel Constructor Initializes a new instance of LivePanel.

Public Instance Properties

AccessKey (inherited from WebControl) | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the Web server control.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BackImageUrl | Gets or sets the URL of the background image for the LiveControls.LivePanel control.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
HorizontalAlign | Gets or sets the horizontal alignment of the contents within the LiveControls.LivePanel.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.
Wrap | Gets or sets a value indicating whether the content wraps within the LiveControls.LivePanel.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LivePanel Class | Dart.PowerWEB.LiveControls Namespace


LivePanel Constructor

Initializes a new instance of LivePanel.

[Visual Basic]
Public Sub New()
[C#]
public LivePanel();

Remarks

The default constructor initializes a new instance of LivePanel.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel Properties

The properties of the LivePanel class are listed below. For a complete list of LivePanel class members, see the LivePanel Members topic.

Public Instance Properties

AccessKey (inherited from WebControl) | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the Web server control.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
BackColor | Gets or sets the background color of the LiveControl.
BackImageUrl | Gets or sets the URL of the background image for the LiveControls.LivePanel control.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
HorizontalAlign | Gets or sets the horizontal alignment of the contents within the LiveControls.LivePanel.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.
Wrap | Gets or sets a value indicating whether the content wraps within the LiveControls.LivePanel.

See Also

LivePanel Class | Dart.PowerWEB.LiveControls Namespace


LivePanel.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.BackImageUrl Property

Gets or sets the URL of the background image for the LiveControls.LivePanel control.

[Visual Basic]
Overrides Public Property BackImageUrl As String
[C#]
public override string BackImageUrl {get; set;}

Property Value

The URL of the background image for the LiveControls.LivePanel control. The default is String.Empty.

Remarks

Use this property to display a custom image for the LiveControls.LivePanel control.

If the image is smaller than the LiveControls.LivePanel, it will be tiled to fill in the LiveControls.LivePanel.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.HorizontalAlign Property

Gets or sets the horizontal alignment of the contents within the LiveControls.LivePanel.

[Visual Basic]
Overrides Public Property HorizontalAlign As HorizontalAlign
[C#]
public override System.Web.UI.WebControls.HorizontalAlign HorizontalAlign {get; set;}

Property Value

One of the HorizontalAlign values. The default is NotSet.

Remarks

Use this property to specify the alignment of the elements in the LiveControls.LivePanel.

Exceptions

Exception Type | Condition
ArgumentException | The specified value is not one of the HorizontalAlign values.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.Wrap Property

Gets or sets a value indicating whether the content wraps within the LiveControls.LivePanel.

[Visual Basic]
Overrides Public Property Wrap As Boolean
[C#]
public override bool Wrap {get; set;}

Property Value

true if the content wraps within the LiveControls.LivePanel; otherwise, false. The default is true.

Remarks

Use this property to wrap the contents of the LiveControls.LivePanel.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel Methods

The methods of the LivePanel class are listed below. For a complete list of LivePanel class members, see the LivePanel Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl)
IAttributeAccessor.SetAttribute (inherited from WebControl)
IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LivePanel Class | Dart.PowerWEB.LiveControls Namespace


LivePanel.GetCallbackEventReference Method

Returns JavaScript that can be used to initiate a callback to the server.

[Visual Basic]
Public Function GetCallbackEventReference( _
   ByVal eventName As String, _
   ByVal argument As String _
) As String
[C#]
public string GetCallbackEventReference(
   string eventName,
   string argument
);

Parameters

eventName
The event corresponding to the callback.
argument
The event arguments for the callback.

Remarks

Returns JavaScript that can be used to initiate a callback to the server.

The settings of the LiveControl (blocking, errorhandling, etc) are automatically taken into account.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.IPostBackEventHandler.RaisePostBackEvent Method

[Visual Basic]
Sub RaisePostBackEvent( _
   ByVal eventArgument As String _
) Implements _
   IPostBackEventHandler.RaisePostBackEvent
[C#]
void IPostBackEventHandler.RaisePostBackEvent(
   string eventArgument
);

Implements

IPostBackEventHandler.RaisePostBackEvent

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel Events

The events of the LivePanel class are listed below. For a complete list of LivePanel class members, see the LivePanel Members topic.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LivePanel Class | Dart.PowerWEB.LiveControls Namespace


LivePanel.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePanel.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LivePanel Class | LivePanel Members | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder Class

A container to store dynamically added server controls on the Web page.

For a list of all members of this type, see LivePlaceHolder Members.

System.Object
Control
PlaceHolder
LivePlaceHolder

[Visual Basic]
Public Class LivePlaceHolder
Inherits PlaceHolder
Implements ILiveControl
[C#]
public class LivePlaceHolder : PlaceHolder, ILiveControl

Remarks

Use the LivePlaceHolder control as a container to store dynamically added server controls to the Web page. The LivePlaceHolder control does not produce any visible output and is only used as a container for other controls on the Web page. You can use the Controls collection to add, insert, or remove a control from the LivePlaceHolder control.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LivePlaceHolder Members | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder Members

Public Instance Constructors

LivePlaceHolder Constructor Initializes a new instance of LivePlaceHolder.

Public Instance Properties

BindingContainer (inherited from Control) |
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible (inherited from Control) | Gets or sets a value that indicates whether a server control is rendered as UI on the page.

Public Instance Methods

DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IParserAccessor.AddParsedSubObject (inherited from Control)

See Also

LivePlaceHolder Class | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder Constructor

Initializes a new instance of LivePlaceHolder.

[Visual Basic]
Public Sub New()
[C#]
public LivePlaceHolder();

Remarks

The default constructor initializes a new instance of LivePlaceHolder.

See Also

LivePlaceHolder Class | LivePlaceHolder Members | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder Properties

The properties of the LivePlaceHolder class are listed below. For a complete list of LivePlaceHolder class members, see the LivePlaceHolder Members topic.

Public Instance Properties

BindingContainer (inherited from Control) |
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible (inherited from Control) | Gets or sets a value that indicates whether a server control is rendered as UI on the page.

See Also

LivePlaceHolder Class | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LivePlaceHolder Class | LivePlaceHolder Members | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LivePlaceHolder Class | LivePlaceHolder Members | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LivePlaceHolder Class | LivePlaceHolder Members | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LivePlaceHolder Class | LivePlaceHolder Members | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LivePlaceHolder Class | LivePlaceHolder Members | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LivePlaceHolder Class | LivePlaceHolder Members | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder Methods

The methods of the LivePlaceHolder class are listed below. For a complete list of LivePlaceHolder class members, see the LivePlaceHolder Members topic.

Public Instance Methods

DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IParserAccessor.AddParsedSubObject (inherited from Control)

See Also

LivePlaceHolder Class | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LivePlaceHolder Class | LivePlaceHolder Members | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LivePlaceHolder Class | LivePlaceHolder Members | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LivePlaceHolder Class | LivePlaceHolder Members | Dart.PowerWEB.LiveControls Namespace


LivePlaceHolder.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LivePlaceHolder Class | LivePlaceHolder Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton Class

Represents a radio button control.

For a list of all members of this type, see LiveRadioButton Members.

System.Object
Control
WebControl
CheckBox
RadioButton
LiveRadioButton

[Visual Basic]
Public Class LiveRadioButton
Inherits RadioButton
Implements ILiveControl, ILiveWebControl, ILiveCallbackHandler
[C#]
public class LiveRadioButton : RadioButton, ILiveControl, ILiveWebControl, ILiveCallbackHandler

Remarks

The LiveRadioButton server control permits you to intersperse the radio buttons in a group with other content in the page. The buttons are grouped logically if they all share the same GroupName.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton Members

Public Instance Constructors

LiveRadioButton Constructor Initializes a new instance of LiveRadioButton.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
Checked | Gets or sets a value indicating whether the LiveControls.LiveRadioButton control is checked.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
GroupName (inherited from RadioButton) | Gets or sets the name of the group that the radio button belongs to.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text label associated with the LiveControls.LiveRadioButton.
TextAlign | Gets or sets the alignment of the text label associated with the LiveControls.LiveRadioButton control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

CheckedChanged (inherited from CheckBox) | Occurs when the value of the Checked property changes between posts to the server.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

See Also

LiveRadioButton Class | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton Constructor

Initializes a new instance of LiveRadioButton.

[Visual Basic]
Public Sub New()
[C#]
public LiveRadioButton();

Remarks

The default constructor initializes a new instance of LiveRadioButton.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton Properties

The properties of the LiveRadioButton class are listed below. For a complete list of LiveRadioButton class members, see the LiveRadioButton Members topic.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
Checked | Gets or sets a value indicating whether the LiveControls.LiveRadioButton control is checked.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
GroupName (inherited from RadioButton) | Gets or sets the name of the group that the radio button belongs to.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text label associated with the LiveControls.LiveRadioButton.
TextAlign | Gets or sets the alignment of the text label associated with the LiveControls.LiveRadioButton control.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveRadioButton Class | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.AccessKey Property

Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.

[Visual Basic]
Overrides Public Property AccessKey As String
[C#]
public override string AccessKey {get; set;}

Property Value

The access key for quick navigation to the LiveControl. The default value is String.Empty, which indicates that this property is not set.

Remarks

Use the AccessKey property to specify the keyboard shortcut for the LiveControl. This allows you to navigate quickly to the control by pressing the ALT key and the key for the specified character on the keyboard. For example, setting the access key of a control to the string "D" indicates that the user can navigate to the control by pressing ALT+D.

Only a single character string is allowed for the AccessKey property. If you attempt to set this property to a value that is not a null reference (Nothing in Visual Basic), String.Empty, or a single character string, an exception is thrown.

Exceptions

Exception Type | Condition
ArgumentException | The specified access key is not either a null reference (Nothing in Visual Basic), String.Empty, or a single character string.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.AutoPostBack Property

Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.

[Visual Basic]
Overrides Public Property AutoPostBack As Boolean
[C#]
public override bool AutoPostBack {get; set;}

Property Value

true whenever the user changes the text in the text box and then tabs out of the control; otherwise, false. The default is true, which is different than the non-Live TextBox.

Remarks

For Live List Controls, set this property to true if the server needs to capture the change as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's selection from the list control. This property can be used to allow automatic population of other controls on the Web page based on a user's selection from the list.

For LiveCheckBox and LiveRadioButton, use this property to specify whether the state of the LiveControl is posted back to the server when clicked.

Note When AutoPostBack is true and ILiveCallbackHandler.EnableCallback is true, the LiveControl will perform automatic callbacks. If ILiveCallbackHandler.EnableCallback is false, traditional postbacks will occur.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.Checked Property

Gets or sets a value indicating whether the LiveControls.LiveRadioButton control is checked.

[Visual Basic]
Overrides Public Property Checked As Boolean
[C#]
public override bool Checked {get; set;}

Property Value

true to indicate a checked state; otherwise, false. The default is false.

Remarks

Use this property to determine whether the LiveControls.LiveRadioButton control is checked. This property can also be used to programmatically set the state of the LiveControls.LiveRadioButton control.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.Text Property

Gets or sets the text label associated with the LiveControls.LiveRadioButton.

[Visual Basic]
Public Property Text As String
[C#]
new public string Text {get; set;}

Property Value

The text label associated with the LiveControls.LiveRadioButton. The default value is String.Empty.

Remarks

Use this property to specify the text label associated with the LiveControls.LiveRadioButton control. This property can also be used to programmatically get the text label associated with the LiveControls.LiveRadioButton control.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.TextAlign Property

Gets or sets the alignment of the text label associated with the LiveControls.LiveRadioButton control.

[Visual Basic]
Public Property TextAlign As TextAlign
[C#]
new public System.Web.UI.WebControls.TextAlign TextAlign {get; set;}

Property Value

One of the TextAlign values. The default value is Right.

Remarks

Use this property to specify the alignment of the text label associated with the LiveControls.LiveRadioButton control. You can specify whether the text label appears to the right or left of the radio button. Use the LiveRadioButton.Text property to specify the label text.

Exceptions

Exception Type | Condition
ArgumentException | The specified value is not one of the TextAlign values.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton Methods

The methods of the LiveRadioButton class are listed below. For a complete list of LiveRadioButton class members, see the LiveRadioButton Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

See Also

LiveRadioButton Class | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.GetCallbackEventReference Method

Returns JavaScript that can be used to initiate a callback to the server.

[Visual Basic]
Public Function GetCallbackEventReference( _
   ByVal eventName As String, _
   ByVal argument As String _
) As String
[C#]
public string GetCallbackEventReference(
   string eventName,
   string argument
);

Parameters

eventName
The event corresponding to the callback.
argument
The event arguments for the callback.

Remarks

Returns JavaScript that can be used to initiate a callback to the server.

The settings of the LiveControl (blocking, errorhandling, etc) are automatically taken into account.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.IPostBackDataHandler.LoadPostData Method

When implemented by a class, processes post back data for an ASP.NET server control.

[Visual Basic]
Function LoadPostData( _
   ByVal postDataKey As String, _
   ByVal postCollection As NameValueCollection _
) As Boolean Implements _
   IPostBackDataHandler.LoadPostData
[C#]
new bool IPostBackDataHandler.LoadPostData(
   string postDataKey,
   NameValueCollection postCollection
);

Parameters

postDataKey
The key identifier for the control.
postCollection
The collection of all incoming name values.

Implements

IPostBackDataHandler.LoadPostData

Remarks

The Web Forms page framework tracks all the server control's that return true to this method call, then invokes the IPostBackDataHandler.RaisePostDataChangedEvent on those controls.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.IPostBackDataHandler.RaisePostDataChangedEvent Method

When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

[Visual Basic]
Sub RaisePostDataChangedEvent() Implements _
   IPostBackDataHandler.RaisePostDataChangedEvent
[C#]
new void IPostBackDataHandler.RaisePostDataChangedEvent();

Implements

IPostBackDataHandler.RaisePostDataChangedEvent

Remarks

Change events for the server control that implements this interface, if any, are raised from this method.

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton Events

The events of the LiveRadioButton class are listed below. For a complete list of LiveRadioButton class members, see the LiveRadioButton Members topic.

Public Instance Events

CheckedChanged (inherited from CheckBox) | Occurs when the value of the Checked property changes between posts to the server.
ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveRadioButton Class | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButton.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButton Class | LiveRadioButton Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonColumn Class

A column type for the LiveControls.LiveDataGrid control that contains radio buttons.

For a list of all members of this type, see LiveRadioButtonColumn Members.

System.Object
DataGridColumn
BoundColumn
LiveRadioButtonColumn

[Visual Basic]
Public Class LiveRadioButtonColumn
Inherits BoundColumn
[C#]
public class LiveRadioButtonColumn : BoundColumn

Remarks

Use the LiveRadioButtonColumn column type in a LiveControls.LiveDataGrid control to create a radio button that corresponds with each row in the LiveControls.LiveDataGrid control.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveRadioButtonColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonColumn Members

Public Instance Constructors

LiveRadioButtonColumn Constructor Initializes a new instance of LiveRadioButtonColumn.

Public Instance Properties

AutoPostback | Gets or sets a value indicating whether the radio buttons automatically post back to the server when checked.
DataField (inherited from BoundColumn) | Gets or sets the field name from the data source to bind to the BoundColumn.
DataFormatString (inherited from BoundColumn) | Gets or sets the string that specifies the display format for items in the column.
FooterStyle (inherited from DataGridColumn) | Gets the style properties for the footer section of the column.
FooterText (inherited from DataGridColumn) | Gets or sets the text displayed in the footer section of the column.
HeaderImageUrl (inherited from DataGridColumn) | Gets or sets the location of an image to display in the header section of the column.
HeaderStyle (inherited from DataGridColumn) | Gets the style properties for the header section of the column.
HeaderText (inherited from DataGridColumn) | Gets or sets the text displayed in the header section of the column.
ItemStyle (inherited from DataGridColumn) | Gets the style properties for the item cells of the column.
ReadOnly (inherited from BoundColumn) | Gets or sets a value that indicates whether the items in the BoundColumn can be edited.
SelectedIndex | Gets or sets the lowest ordinal index of the selected items in the list.
SortExpression (inherited from DataGridColumn) | Gets or sets the name of the field or expression to pass to the OnSortCommand method when a column is selected for sorting.
Visible (inherited from DataGridColumn) | Gets or sets a value that indicates whether the column is visible in the DataGrid control.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from BoundColumn) | Resets the BoundColumn to its initial state.
InitializeCell | Resets the specified cell in the LiveControls.LiveRadioButtonColumn to its initial state.
ToString (inherited from DataGridColumn) |

Explicit Interface Implementations

IStateManager.LoadViewState (inherited from DataGridColumn)
IStateManager.SaveViewState (inherited from DataGridColumn)
IStateManager.TrackViewState (inherited from DataGridColumn)

See Also

LiveRadioButtonColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonColumn Constructor

Initializes a new instance of LiveRadioButtonColumn.

[Visual Basic]
Public Sub New()
[C#]
public LiveRadioButtonColumn();

Remarks

The default constructor initializes a new instance of LiveRadioButtonColumn.

See Also

LiveRadioButtonColumn Class | LiveRadioButtonColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonColumn Properties

The properties of the LiveRadioButtonColumn class are listed below. For a complete list of LiveRadioButtonColumn class members, see the LiveRadioButtonColumn Members topic.

Public Instance Properties

AutoPostback | Gets or sets a value indicating whether the radio buttons automatically post back to the server when checked.
DataField (inherited from BoundColumn) | Gets or sets the field name from the data source to bind to the BoundColumn.
DataFormatString (inherited from BoundColumn) | Gets or sets the string that specifies the display format for items in the column.
FooterStyle (inherited from DataGridColumn) | Gets the style properties for the footer section of the column.
FooterText (inherited from DataGridColumn) | Gets or sets the text displayed in the footer section of the column.
HeaderImageUrl (inherited from DataGridColumn) | Gets or sets the location of an image to display in the header section of the column.
HeaderStyle (inherited from DataGridColumn) | Gets the style properties for the header section of the column.
HeaderText (inherited from DataGridColumn) | Gets or sets the text displayed in the header section of the column.
ItemStyle (inherited from DataGridColumn) | Gets the style properties for the item cells of the column.
ReadOnly (inherited from BoundColumn) | Gets or sets a value that indicates whether the items in the BoundColumn can be edited.
SelectedIndex | Gets or sets the lowest ordinal index of the selected items in the list.
SortExpression (inherited from DataGridColumn) | Gets or sets the name of the field or expression to pass to the OnSortCommand method when a column is selected for sorting.
Visible (inherited from DataGridColumn) | Gets or sets a value that indicates whether the column is visible in the DataGrid control.

See Also

LiveRadioButtonColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonColumn.AutoPostback Property

Gets or sets a value indicating whether the radio buttons automatically post back to the server when checked.

[Visual Basic]
Public Property AutoPostback As Boolean
[C#]
public bool AutoPostback {get; set;}

Property Value

true to automatically post to the server; otherwise, false. The default is true.

Remarks

Use this property to specify whether the state of the LiveControls.LiveRadioButtonColumn is posted back to the server when clicked (via callback or postback, depending on the value of ILiveCallbackHandler.EnableCallback).

See Also

LiveRadioButtonColumn Class | LiveRadioButtonColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonColumn.SelectedIndex Property

Gets or sets the lowest ordinal index of the selected items in the list.

[Visual Basic]
Public Property SelectedIndex As Integer
[C#]
public int SelectedIndex {get; set;}

Property Value

The lowest ordinal index of the selected items in the list. The default is -1, which indicates that nothing is selected.

Remarks

Use this property to determine the index of the currently selected item in the list if the list control allows only one selection. If the list control supports multiple selections, use this property to determine the lowest index of the selected items.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The index was set to less than -1, or greater than or equal to the number of items on the list.

See Also

LiveRadioButtonColumn Class | LiveRadioButtonColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonColumn Methods

The methods of the LiveRadioButtonColumn class are listed below. For a complete list of LiveRadioButtonColumn class members, see the LiveRadioButtonColumn Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from BoundColumn) | Resets the BoundColumn to its initial state.
InitializeCell | Resets the specified cell in the LiveControls.LiveRadioButtonColumn to its initial state.
ToString (inherited from DataGridColumn) |

Explicit Interface Implementations

IStateManager.LoadViewState (inherited from DataGridColumn)
IStateManager.SaveViewState (inherited from DataGridColumn)
IStateManager.TrackViewState (inherited from DataGridColumn)

See Also

LiveRadioButtonColumn Class | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonColumn.InitializeCell Method

Resets the specified cell in the LiveControls.LiveRadioButtonColumn to its initial state.

[Visual Basic]
Overrides Public Sub InitializeCell( _
   ByVal cell As TableCell, _
   ByVal columnIndex As Integer, _
   ByVal itemType As ListItemType _
)
[C#]
public override void InitializeCell(
   TableCell cell,
   int columnIndex,
   ListItemType itemType
);

Parameters

cell
A TableCell object that represents the cell to reset.
columnIndex
The column number where the cell is located.
itemType
One of the ListItemType values.

Remarks

The InitializeCell method resets the specified cell in the LiveControls.LiveRadioButtonColumn to its initial state.

See Also

LiveRadioButtonColumn Class | LiveRadioButtonColumn Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList Class

Represents a list control that encapsulates a group of radio button controls.

For a list of all members of this type, see LiveRadioButtonList Members.

System.Object
Control
WebControl
ListControl
RadioButtonList
LiveRadioButtonList

[Visual Basic]
Public Class LiveRadioButtonList
Inherits RadioButtonList
Implements ILiveControl, ILiveWebControl, ILiveCallbackHandler
[C#]
public class LiveRadioButtonList : RadioButtonList, ILiveControl, ILiveWebControl, ILiveCallbackHandler

Remarks

The LiveRadioButtonList control provides page developers with a single-selection radio button group that can be dynamically generated through data binding. It contains an Items collection with members that correspond to individual items on the list. To determine which item is selected, test the RadioButtonList.SelectedItem property of the list.

You can specify the rendering of the list with the RadioButtonList.RepeatLayout and RadioButtonList.RepeatDirection properties. If RadioButtonList.RepeatLayout is set to RepeatLayout.Table (the default setting), the list will be rendered within a table. If it is set to RepeatLayout.Flow, the list will be rendered without any tabular structure. By default, RadioButtonList.RepeatDirection is set to RepeatDirection.Vertical. Setting this property to RepeatDirection.Horizontal will render the list horizontally.

Example

[Visual Basic, C#] The following example demonstrates different ways of adding items to a Live List control.

[Visual Basic]
'In the following examples, items are added to all four types of Live List controls
'These include the LiveListBox, LiveDropDownList, LiveRadioButtonList and LiveCheckBoxList
'Each Live List control can be interchanged with another

'Add items using an ArrayList, and show a LiveMessageBox when an item is selected

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Create a new ArrayList with the items to add to the Live list control
    Dim arrayItems As New ArrayList()
    arrayItems.Add("Alert")
    arrayItems.Add("Confirm")
    arrayItems.Add("Prompt")

    'Set the data source to the ArrayList and bind it to the Live list control
    LiveRadioButtonList1.DataSource = arrayItems
    LiveRadioButtonList1.DataBind()
End Sub

Private Sub LiveRadioButtonList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveRadioButtonList1.SelectedIndexChanged
    'When a type of MessageBox is selected from the list, show it
    Select Case (LiveRadioButtonList1.SelectedIndex)
    Case 0
        LiveMessageBox1.Show("You have selected 'Alert'", DialogType.Alert)
        Case 1
        LiveMessageBox1.Show("You have selected 'Confirm'", DialogType.Confirm)
        Case 2
        LiveMessageBox1.Show("You have selected 'Prompt'", DialogType.Prompt)
        Case Else
    End Select
End Sub

Private Sub LiveMessageBox1_Response(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.ResponseEventArgs) Handles LiveMessageBox1.Response
    'After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    'If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    If (e.DialogType = DialogType.Confirm) Then
        If (e.Confirmed) Then
        LiveTextBox1.Text = "The OK button was pressed"
        Else
        LiveTextBox1.Text = "The Cancel button was pressed"
        End If

        'If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    ElseIf (e.DialogType = DialogType.Prompt) Then
        If (Not e.Confirmed) Then
        LiveTextBox1.Text = "The Prompt was cancelled"
        Else
        LiveTextBox1.Text = "The inputted data was: " + e.Text
        End If
    End If
End Sub

'Add items dynamically, when a LiveButton is pressed

Private Sub LiveButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton2.Click
    'Add items dynamically in code to a list control
    'When the LiveButton is pressed, a new item is added to the list
    LiveListBox1.Items.Add(DateTime.Now.ToString())
End Sub

Private Sub LiveListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveListBox1.SelectedIndexChanged
    'A LiveLabel is updated whenever an item is selected from the list
    LiveLabel1.Text = "This item was added at " + LiveListBox1.Items(LiveListBox1.SelectedIndex).ToString()
End Sub

'Add items from a database, and display an image when an item is selected

Private Sub LiveButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton3.Click
    'Make sure that System.Data.OleDb is used

    'Get Items from a Database "images.mdb" in the folder "database"
    'The table is called "Table1" and the column with the filenames is "filename"
    Dim connection As New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"))
    Dim sql As String = "SELECT filename FROM Table1"
    Dim adapter As New OleDbDataAdapter(sql, connection)
    Dim dataSet As New DataSet("imagesDataSet")
    adapter.Fill(dataSet, "images")

    'Bind the database to the Live List
    LiveDropDownList1.DataSource = dataSet
    LiveDropDownList1.DataMember = "images"
    LiveDropDownList1.DataTextField = "filename"
    LiveDropDownList1.DataBind()

    'Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveDropDownList1.SelectedIndex = 0
    LiveDropDownList1_SelectedIndexChanged(Me, Nothing)
End Sub

Private Sub LiveDropDownList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveDropDownList1.SelectedIndexChanged
    'The Live List has been populated with some image filenames
    'When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image."
    LiveImage1.ImageUrl = "images/" + LiveDropDownList1.SelectedItem.Text
End Sub

'Add items to the Items.Collection and play a sound when an item is selected

Private Sub LiveButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton4.Click
    'Add items to the Live list control via the ListItemCollection
    LiveCheckBoxList1.Items.Add("chord.wav")
    LiveCheckBoxList1.Items.Add("chimes.wav")
    LiveCheckBoxList1.Items.Add("exclamation.wav")
    LiveCheckBoxList1.Items.Add("error.wav")
End Sub

Private Sub LiveCheckBoxList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveCheckBoxList1.SelectedIndexChanged
    'When an item in the LiveCheckBoxList is selected or de-selected
    'The selected sound that is topmost in the list will play
    If (LiveCheckBoxList1.SelectedIndex > -1) Then
        LiveSound1.Source = "sounds/" + LiveCheckBoxList1.Items(LiveCheckBoxList1.SelectedIndex).ToString()
        LiveSound1.Play()
    End If
End Sub
                    [C#]
//In the following examples, items are added to all four types of Live List controls
//These include the LiveListBox, LiveDropDownList, LiveRadioButtonList and LiveCheckBoxList
//Each Live List control can be interchanged with another

//Add items using an ArrayList, and show a LiveMessageBox when an item is selected

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Create a new ArrayList with the items to add to the Live list control
    ArrayList arrayItems = new ArrayList();
    arrayItems.Add("Alert");
    arrayItems.Add("Confirm");
    arrayItems.Add("Prompt");

    //Set the data source to the ArrayList and bind it to the Live list control
    LiveRadioButtonList1.DataSource = arrayItems;
    LiveRadioButtonList1.DataBind();
}

private void LiveRadioButtonList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When a type of MessageBox is selected from the list, show it
    switch (LiveRadioButtonList1.SelectedIndex)
    {
        case 0:
            LiveMessageBox1.Show("You have selected 'Alert'!", DialogType.Alert);
            break;
        case 1:
            LiveMessageBox1.Show("You have selected 'Confirm'!", DialogType.Confirm);
            break;
        case 2:
            LiveMessageBox1.Show("You have selected 'Prompt'!", DialogType.Prompt);
            break;
        default:
            break;
    }
}

private void LiveMessageBox1_Response(object sender, Dart.PowerWEB.LiveControls.ResponseEventArgs e)
{
    //After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    //If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    if (e.DialogType == DialogType.Confirm)
    {
        if (e.Confirmed)
            LiveTextBox1.Text = "The OK button was pressed!";
        else
            LiveTextBox1.Text = "The Cancel button was pressed!";
    }
    //If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    else if (e.DialogType == DialogType.Prompt)
    {
        if (!e.Confirmed)
            LiveTextBox1.Text = "The Prompt was cancelled!";
        else
            LiveTextBox1.Text = "The inputted data was: " + e.Text;
    }
}

//Add items dynamically, when a LiveButton is pressed

private void LiveButton2_Click(object sender, System.EventArgs e)
{
    //Add items dynamically in code to a list control
    //When the LiveButton is pressed, a new item is added to the list
    LiveListBox1.Items.Add(DateTime.Now.ToString());
}

private void LiveListBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //A LiveLabel is updated whenever an item is selected from the list
    LiveLabel1.Text = "This item was added at " + LiveListBox1.Items[LiveListBox1.SelectedIndex];
}

//Add items from a database, and display an image when an item is selected

private void LiveButton3_Click(object sender, System.EventArgs e)
{
    //Make sure that System.Data.OleDb is used

    //Get Items from a Database "images.mdb" in the folder "database"
    //The table is called "Table1" and the column with the filenames is "filename"
    OleDbConnection connection = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/images.mdb"));
    string sql = "SELECT filename FROM Table1";
    OleDbDataAdapter adapter = new OleDbDataAdapter(sql, connection);
    DataSet dataSet = new DataSet("imagesDataSet");
    adapter.Fill(dataSet, "images");

    //Bind the database to the Live List
    LiveDropDownList1.DataSource = dataSet;
    LiveDropDownList1.DataMember = "images";
    LiveDropDownList1.DataTextField = "filename";
    LiveDropDownList1.DataBind();

    //Set a starting image, and show it by executing the SelectedIndexChanged event handler
    LiveDropDownList1.SelectedIndex = 0;
    LiveDropDownList1_SelectedIndexChanged(this, null);
}

private void LiveDropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //The Live List has been populated with some image filenames
    //When a new item is selected in the list, the new image is displayed
    LiveImage1.AlternateText = "Could not display selected image.";
    LiveImage1.ImageUrl = "images/" + LiveDropDownList1.SelectedItem.Text;
}

//Add items to the Items.Collection and play a sound when an item is selected

private void LiveButton4_Click(object sender, System.EventArgs e)
{
    //Add items to the Live list control via the ListItemCollection
    LiveCheckBoxList1.Items.Add("chord.wav");
    LiveCheckBoxList1.Items.Add("chimes.wav");
    LiveCheckBoxList1.Items.Add("exclamation.wav");
    LiveCheckBoxList1.Items.Add("error.wav");
}

private void LiveCheckBoxList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When an item in the LiveCheckBoxList is selected or de-selected
    //The selected sound that is topmost in the list will play
    if (LiveCheckBoxList1.SelectedIndex > -1)
    {
        LiveSound1.Source = "sounds/" + LiveCheckBoxList1.Items[LiveCheckBoxList1.SelectedIndex];
        LiveSound1.Play();
    }
}

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList Members

Public Instance Constructors

LiveRadioButtonList Constructor Initializes a new instance of LiveRadioButtonColumn.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
CellPadding | Gets or sets the distance (in pixels) between the border and contents of the cell.
CellSpacing | Gets or sets the distance (in pixels) between cells.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataMember (inherited from ListControl) | Gets or sets the specific table in the DataSource to bind to the control.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
DataSource (inherited from ListControl) | Gets or sets the data source that populates the items of the list control.
DataTextField (inherited from ListControl) | Gets or sets the field of the data source that provides the text content of the list items.
DataTextFormatString (inherited from ListControl) | Gets or sets the formatting string used to control how data bound to the list control is displayed.
DataValueField (inherited from ListControl) | Gets or sets the field of the data source that provides the value of each list item.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Items (inherited from ListControl) | Gets the collection of items in the list control.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
RepeatColumns | Gets or sets the number of columns to display in the LiveRadioButtonList control.
RepeatDirection | Gets or sets a value that indicates whether the control displays vertically or horizontally.
RepeatLayout | Gets or sets the layout of the check boxes.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
SelectedIndex | Gets or sets the lowest ordinal index of the selected items in the list.
SelectedItem (inherited from ListControl) | Gets the selected item with the lowest index in the list control.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
TextAlign | Gets or sets the text alignment for the radio buttons within the group.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
ClearSelection (inherited from ListControl) |
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
SelectedIndexChanged (inherited from ListControl) | Occurs when the selection on the list changes and is posted back to the server.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.
IRepeatInfoUser.GetItemStyle (inherited from RadioButtonList) |
IRepeatInfoUser.RenderItem (inherited from RadioButtonList) |

See Also

LiveRadioButtonList Class | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList Constructor

Initializes a new instance of LiveRadioButtonColumn.

[Visual Basic]
Public Sub New()
[C#]
public LiveRadioButtonList();

Remarks

The default constructor initializes a new instance of LiveRadioButtonColumn.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList Properties

The properties of the LiveRadioButtonList class are listed below. For a complete list of LiveRadioButtonList class members, see the LiveRadioButtonList Members topic.

Public Instance Properties

AccessKey | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
CellPadding | Gets or sets the distance (in pixels) between the border and contents of the cell.
CellSpacing | Gets or sets the distance (in pixels) between cells.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataMember (inherited from ListControl) | Gets or sets the specific table in the DataSource to bind to the control.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
DataSource (inherited from ListControl) | Gets or sets the data source that populates the items of the list control.
DataTextField (inherited from ListControl) | Gets or sets the field of the data source that provides the text content of the list items.
DataTextFormatString (inherited from ListControl) | Gets or sets the formatting string used to control how data bound to the list control is displayed.
DataValueField (inherited from ListControl) | Gets or sets the field of the data source that provides the value of each list item.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Items (inherited from ListControl) | Gets the collection of items in the list control.
Left | Gets or sets the left position of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
RepeatColumns | Gets or sets the number of columns to display in the LiveRadioButtonList control.
RepeatDirection | Gets or sets a value that indicates whether the control displays vertically or horizontally.
RepeatLayout | Gets or sets the layout of the check boxes.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
SelectedIndex | Gets or sets the lowest ordinal index of the selected items in the list.
SelectedItem (inherited from ListControl) | Gets the selected item with the lowest index in the list control.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
TextAlign | Gets or sets the text alignment for the radio buttons within the group.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.

See Also

LiveRadioButtonList Class | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.AccessKey Property

Gets or sets the access key (underlined letter) that allows you to quickly navigate to the LiveControl.

[Visual Basic]
Overrides Public Property AccessKey As String
[C#]
public override string AccessKey {get; set;}

Property Value

The access key for quick navigation to the LiveControl. The default value is String.Empty, which indicates that this property is not set.

Remarks

Use the AccessKey property to specify the keyboard shortcut for the LiveControl. This allows you to navigate quickly to the control by pressing the ALT key and the key for the specified character on the keyboard. For example, setting the access key of a control to the string "D" indicates that the user can navigate to the control by pressing ALT+D.

Only a single character string is allowed for the AccessKey property. If you attempt to set this property to a value that is not a null reference (Nothing in Visual Basic), String.Empty, or a single character string, an exception is thrown.

Exceptions

Exception Type | Condition
ArgumentException | The specified access key is not either a null reference (Nothing in Visual Basic), String.Empty, or a single character string.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.AutoPostBack Property

Gets or sets a value indicating whether a postback (or callback) to the server automatically occurs when the user changes the LiveControl's list selection or checked state.

[Visual Basic]
Overrides Public Property AutoPostBack As Boolean
[C#]
public override bool AutoPostBack {get; set;}

Property Value

true whenever the user changes the text in the text box and then tabs out of the control; otherwise, false. The default is true, which is different than the non-Live TextBox.

Remarks

For Live List Controls, set this property to true if the server needs to capture the change as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's selection from the list control. This property can be used to allow automatic population of other controls on the Web page based on a user's selection from the list.

For LiveCheckBox and LiveRadioButton, use this property to specify whether the state of the LiveControl is posted back to the server when clicked.

Note When AutoPostBack is true and ILiveCallbackHandler.EnableCallback is true, the LiveControl will perform automatic callbacks. If ILiveCallbackHandler.EnableCallback is false, traditional postbacks will occur.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.CellPadding Property

Gets or sets the distance (in pixels) between the border and contents of the cell.

[Visual Basic]
Overrides Public Property CellPadding As Integer
[C#]
public override int CellPadding {get; set;}

Property Value

The distance (in pixels) between the border and contents of the cell. The default is -1, which indicates this property is not set.

Remarks

Use this property to control the spacing between the contents of a cell and the cell's border in the LiveRadioButtonList control.

The padding amount specified is added to all four sides of a cell with the height of the tallest cell and width of the widest cell in the LiveRadioButtonList control. The resulting cell size is applied uniformly to all cells in the LiveRadioButtonList control.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.CellSpacing Property

Gets or sets the distance (in pixels) between cells.

[Visual Basic]
Overrides Public Property CellSpacing As Integer
[C#]
public override int CellSpacing {get; set;}

Property Value

The distance (in pixels) between cells. The default is -1, which indicates that this property is not set.

Remarks

Use this property to control the spacing between individual cells in the LiveRadioButtonList control. This property is applied both vertically and horizontally.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.RepeatColumns Property

Gets or sets the number of columns to display in the LiveRadioButtonList control.

[Visual Basic]
Overrides Public Property RepeatColumns As Integer
[C#]
public override int RepeatColumns {get; set;}

Property Value

The number of columns to display in the LiveRadioButtonList control. The default is 0, which indicates this property is not set.

Remarks

Use this property to specify the number of columns that display items in the LiveRadioButtonList control. If this property is not set, the LiveRadioButtonList control displays all list items in a single column.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The number of columns is set to a negative value.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.RepeatDirection Property

Gets or sets a value that indicates whether the control displays vertically or horizontally.

[Visual Basic]
Overrides Public Property RepeatDirection As RepeatDirection
[C#]
public override System.Web.UI.WebControls.RepeatDirection RepeatDirection {get; set;}

Property Value

One of the RepeatDirection values. The default is Vertical.

Remarks

Use this property to specify the display direction of the LiveRadioButtonList control.

Note The number of columns displayed is always determined by the RepeatColumns property.

If this property is set to RepeatDirection.Vertical, the items in the list are displayed in columns loaded top to bottom, then left to right, until all items are rendered. For example, if the RepeatColumns property is set to 3, the items in the LiveRadioButtonList control are displayed in three columns, as in the following table.

1 | 4 | 7
2 | 5 | 8
3 | 6 |

If this property is set to RepeatDirection.Horizontal, the items in the list are displayed in rows loaded left to right, then top to bottom, until all items are rendered. For example, if the RepeatColumns property is set to 3, the items of the LiveRadioButtonList control are displayed in rows of three items each, as in the following table.

1 | 2 | 3
4 | 5 | 6
7 | 8 |

Exceptions

Exception Type | Condition
ArgumentException | The specified display direction of the list is not one of the RepeatDirection values.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.RepeatLayout Property

Gets or sets the layout of the check boxes.

[Visual Basic]
Overrides Public Property RepeatLayout As RepeatLayout
[C#]
public override System.Web.UI.WebControls.RepeatLayout RepeatLayout {get; set;}

Property Value

One of the RepeatLayout values. The default is Table.

Remarks

Use this property to specify whether the items in the LiveRadioButtonList control are displayed in a table. If this property is set to RepeatLayout.Table, the items in the list are displayed in a table. If this property is set to RepeatLayout.Flow, the items in the list are displayed without a table structure.

Exceptions

Exception Type | Condition
ArgumentException | The specified layout is not one of the RepeatLayout values.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.SelectedIndex Property

Gets or sets the lowest ordinal index of the selected items in the list.

[Visual Basic]
Overrides Public Property SelectedIndex As Integer
[C#]
public override int SelectedIndex {get; set;}

Property Value

The lowest ordinal index of the selected items in the list. The default is -1, which indicates that nothing is selected.

Remarks

Use this property to determine the index of the currently selected item in the list if the list control allows only one selection. If the list control supports multiple selections, use this property to determine the lowest index of the selected items.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The index was set to less than -1, or greater than or equal to the number of items on the list.

Example

[Visual Basic, C#] The following example demonstrates using a LiveMessageBox in combination with a Live List control.

[Visual Basic]
'In this example, items are added to a Live List control using an ArrayList when a LiveButton is pressed
'The items include different LiveMessageBox Dialog Types
'When one of the Types is selected in the List, the MessageBox is shown
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Create a new ArrayList with the items to add to the Live list control
    Dim arrayItems As New ArrayList()
    arrayItems.Add("Alert")
    arrayItems.Add("Confirm")
    arrayItems.Add("Prompt")

    'Set the data source to the ArrayList and bind it to the Live list control
    LiveList1.DataSource = arrayItems
    LiveList1.DataBind()
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveList1.SelectedIndexChanged
    'When a type of MessageBox is selected from the list, show it
    Select Case (LiveList1.SelectedIndex)
        Case 0
            LiveMessageBox1.Show("You have selected 'Alert'!", DialogType.Alert)
        Case 1
            LiveMessageBox1.Show("You have selected 'Confirm'!", DialogType.Confirm)
        Case 2
            LiveMessageBox1.Show("You have selected 'Prompt'!", DialogType.Prompt)
        Case Else
    End Select
End Sub

Private Sub LiveMessageBox1_Response(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.ResponseEventArgs) Handles LiveMessageBox1.Response
    'After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    'If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    If (e.DialogType = DialogType.Confirm) Then

        If (e.Confirmed) Then
            LiveTextBox1.Text = "The OK button was pressed!"
        Else
            LiveTextBox1.Text = "The Cancel button was pressed!"
        End If

    'If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    ElseIf (e.DialogType = DialogType.Prompt) Then
        If (Not e.Confirmed) Then
            LiveTextBox1.Text = "The Prompt was cancelled!"
        Else
            LiveTextBox1.Text = "The inputted data was: " + e.Text
        End If
    End If
End Sub
                    [C#]
//In this example, items are added to a Live List control using an ArrayList when a LiveButton is pressed
//The items include different LiveMessageBox Dialog Types
//When one of the Types is selected in the List, the MessageBox is shown
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Create a new ArrayList with the items to add to the Live list control
    ArrayList arrayItems = new ArrayList();
    arrayItems.Add("Alert");
    arrayItems.Add("Confirm");
    arrayItems.Add("Prompt");

    //Set the data source to the ArrayList and bind it to the Live list control
    LiveList1.DataSource = arrayItems;
    LiveList1.DataBind();
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When a type of MessageBox is selected from the list, show it
    switch (LiveList1.SelectedIndex)
    {
        case 0:
            LiveMessageBox1.Show("You have selected 'Alert'!", DialogType.Alert);
            break;
        case 1:
            LiveMessageBox1.Show("You have selected 'Confirm'!", DialogType.Confirm);
            break;
        case 2:
            LiveMessageBox1.Show("You have selected 'Prompt'!", DialogType.Prompt);
            break;
        default:
            break;
    }
}

private void LiveMessageBox1_Response(object sender, Dart.PowerWEB.LiveControls.ResponseEventArgs e)
{
    //After Confirm and Prompt MessageBoxes are shown, the Response event will fire

    //If it is a Confirm box, indicate which button was pressed in a LiveTextBox
    if (e.DialogType == DialogType.Confirm)
    {
        if (e.Confirmed)
            LiveTextBox1.Text = "The OK button was pressed!";
        else
            LiveTextBox1.Text = "The Cancel button was pressed!";
    }
    //If it is a Prompt box, show the input data (or indicate the prompt was cancelled) in a LiveTextBox
    else if (e.DialogType == DialogType.Prompt)
    {
        if (!e.Confirmed)
            LiveTextBox1.Text = "The Prompt was cancelled!";
        else
            LiveTextBox1.Text = "The inputted data was: " + e.Text;
    }
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.TextAlign Property

Gets or sets the text alignment for the radio buttons within the group.

[Visual Basic]
Overrides Public Property TextAlign As TextAlign
[C#]
public override System.Web.UI.WebControls.TextAlign TextAlign {get; set;}

Property Value

One of the TextAlign values. The default value is Right.

Remarks

Use this property to specify whether the text associated with the radio buttons appears on the left or right of the check box. If this property is set to TextAlign.Right, the text is displayed to the right of the radio button. If this property is set to TextAlign.Left, the text is displayed to the left of the radio button.

Exceptions

Exception Type | Condition
ArgumentException | The specified label text alignment is not one of the TextAlign values.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList Methods

The methods of the LiveRadioButtonList class are listed below. For a complete list of LiveRadioButtonList class members, see the LiveRadioButtonList Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
ClearSelection (inherited from ListControl) |
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.
IRepeatInfoUser.GetItemStyle (inherited from RadioButtonList) |
IRepeatInfoUser.RenderItem (inherited from RadioButtonList) |

See Also

LiveRadioButtonList Class | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.DataBind Method

Binds a data source to the invoked server control and all its child controls.

[Visual Basic]
Overrides Public Sub DataBind()
[C#]
public override void DataBind();

Remarks

Use this method to bind data from a source to a server control. This method is commonly used after retrieving a data set through a database query.

Note When called on a server control, this method resolves all data-binding expressions in the server control and in any of its child controls. This method is commonly overridden when creating custom templated data-bound controls. For more information, see Developing a Templated Data-Bound Control.

For more information about data binding to server controls, see Data Binding Expression Syntax.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.IPostBackDataHandler.LoadPostData Method

When implemented by a class, processes post back data for an ASP.NET server control.

[Visual Basic]
Function LoadPostData( _
   ByVal postDataKey As String, _
   ByVal postCollection As NameValueCollection _
) As Boolean Implements _
   IPostBackDataHandler.LoadPostData
[C#]
new bool IPostBackDataHandler.LoadPostData(
   string postDataKey,
   NameValueCollection postCollection
);

Parameters

postDataKey
The key identifier for the control.
postCollection
The collection of all incoming name values.

Implements

IPostBackDataHandler.LoadPostData

Remarks

The Web Forms page framework tracks all the server control's that return true to this method call, then invokes the IPostBackDataHandler.RaisePostDataChangedEvent on those controls.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.IPostBackDataHandler.RaisePostDataChangedEvent Method

When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

[Visual Basic]
Sub RaisePostDataChangedEvent() Implements _
   IPostBackDataHandler.RaisePostDataChangedEvent
[C#]
new void IPostBackDataHandler.RaisePostDataChangedEvent();

Implements

IPostBackDataHandler.RaisePostDataChangedEvent

Remarks

Change events for the server control that implements this interface, if any, are raised from this method.

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList Events

The events of the LiveRadioButtonList class are listed below. For a complete list of LiveRadioButtonList class members, see the LiveRadioButtonList Members topic.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
SelectedIndexChanged (inherited from ListControl) | Occurs when the selection on the list changes and is posted back to the server.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveRadioButtonList Class | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveRadioButtonList.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveRadioButtonList Class | LiveRadioButtonList Members | Dart.PowerWEB.LiveControls Namespace


LiveSound Class

Plays a sound file client-side during a callback.

For a list of all members of this type, see LiveSound Members.

System.Object
Control
LiveSound

[Visual Basic]
Public Class LiveSound
Inherits Control
Implements ILiveControl
[C#]
public class LiveSound : Control, ILiveControl

Remarks

Use LiveSound.Play to play a sound file located at LiveSound.Source.

Example

[Visual Basic, C#] The following example demonstrates adding items to a Live List control from a database, as well as updating a LiveImage control.

[Visual Basic]
'In this example, items are added to a Live List using Items.Add
'The items are sounds to be played, located in a "sounds" folder
'When one of the items is selected, the corresponding sound is played
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Add items to the Live list control via the ListItemCollection
    LiveList1.Items.Add("chord.wav")
    LiveList1.Items.Add("chimes.wav")
    LiveList1.Items.Add("exclamation.wav")
    LiveList1.Items.Add("error.wav")
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveList1.SelectedIndexChanged
    'When an item in the LiveList is selected or de-selected
    'The selected sound that is topmost in the list will play
    If (LiveList1.SelectedIndex > -1) Then
        LiveSound1.Source = "sounds/" + LiveList1.Items(LiveList1.SelectedIndex).ToString()
        LiveSound1.Play()
    End If
End Sub
                    [C#]
//In this example, items are added to a Live List using Items.Add
//The items are sounds to be played, located in a "sounds" folder
//When one of the items is selected, the corresponding sound is played
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Add items to the Live List control via the ListItemCollection
    LiveList1.Items.Add("chord.wav");
    LiveList1.Items.Add("chimes.wav");
    LiveList1.Items.Add("exclamation.wav");
    LiveList1.Items.Add("error.wav");
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When an item in the Live List is selected or de-selected
    //The selected sound that is topmost in the list will play
    if (LiveList1.SelectedIndex > -1)
    {
        LiveSound1.Source = "sounds/" + LiveList1.Items[LiveList1.SelectedIndex];
        LiveSound1.Play();
    }
}

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound Members

Public Instance Constructors

LiveSound Constructor Initializes a new instance of LiveSound.

Public Instance Properties

BindingContainer (inherited from Control) |
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Source | Gets or sets the path of the sound file to play.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible (inherited from Control) | Gets or sets a value that indicates whether a server control is rendered as UI on the page.

Public Instance Methods

DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
Play | Plays a sound file.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IParserAccessor.AddParsedSubObject (inherited from Control)

See Also

LiveSound Class | Dart.PowerWEB.LiveControls Namespace


LiveSound Constructor

Initializes a new instance of LiveSound.

[Visual Basic]
Public Sub New()
[C#]
public LiveSound();

Remarks

The default constructor initializes a new instance of LiveSound.

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound Properties

The properties of the LiveSound class are listed below. For a complete list of LiveSound class members, see the LiveSound Members topic.

Public Instance Properties

BindingContainer (inherited from Control) |
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Source | Gets or sets the path of the sound file to play.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible (inherited from Control) | Gets or sets a value that indicates whether a server control is rendered as UI on the page.

See Also

LiveSound Class | Dart.PowerWEB.LiveControls Namespace


LiveSound.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound.Source Property

Gets or sets the path of the sound file to play.

[Visual Basic]
Public Property Source As String
[C#]
public string Source {get; set;}

Property Value

The path of the sound file.

Remarks

Use this property to specify the path of a sound file to play when the LiveSound.Play is invoked.

Example

[Visual Basic, C#] The following example demonstrates adding items to a Live List control from a database, as well as updating a LiveImage control.

[Visual Basic]
'In this example, items are added to a Live List using Items.Add
'The items are sounds to be played, located in a "sounds" folder
'When one of the items is selected, the corresponding sound is played
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Add items to the Live list control via the ListItemCollection
    LiveList1.Items.Add("chord.wav")
    LiveList1.Items.Add("chimes.wav")
    LiveList1.Items.Add("exclamation.wav")
    LiveList1.Items.Add("error.wav")
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveList1.SelectedIndexChanged
    'When an item in the LiveList is selected or de-selected
    'The selected sound that is topmost in the list will play
    If (LiveList1.SelectedIndex > -1) Then
        LiveSound1.Source = "sounds/" + LiveList1.Items(LiveList1.SelectedIndex).ToString()
        LiveSound1.Play()
    End If
End Sub
                    [C#]
//In this example, items are added to a Live List using Items.Add
//The items are sounds to be played, located in a "sounds" folder
//When one of the items is selected, the corresponding sound is played
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Add items to the Live List control via the ListItemCollection
    LiveList1.Items.Add("chord.wav");
    LiveList1.Items.Add("chimes.wav");
    LiveList1.Items.Add("exclamation.wav");
    LiveList1.Items.Add("error.wav");
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When an item in the Live List is selected or de-selected
    //The selected sound that is topmost in the list will play
    if (LiveList1.SelectedIndex > -1)
    {
        LiveSound1.Source = "sounds/" + LiveList1.Items[LiveList1.SelectedIndex];
        LiveSound1.Play();
    }
}

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound Methods

The methods of the LiveSound class are listed below. For a complete list of LiveSound class members, see the LiveSound Members topic.

Public Instance Methods

DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
Play | Plays a sound file.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IParserAccessor.AddParsedSubObject (inherited from Control)

See Also

LiveSound Class | Dart.PowerWEB.LiveControls Namespace


LiveSound.GetCallbackEventReference Method

Returns JavaScript that can be used to initiate a callback to the server.

[Visual Basic]
Public Function GetCallbackEventReference( _
   ByVal eventName As String, _
   ByVal argument As String _
) As String
[C#]
public string GetCallbackEventReference(
   string eventName,
   string argument
);

Parameters

eventName
The event corresponding to the callback.
argument
The event arguments for the callback.

Remarks

Returns JavaScript that can be used to initiate a callback to the server.

The settings of the LiveControl (blocking, errorhandling, etc) are automatically taken into account.

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveSound.Play Method

Plays a sound file.

[Visual Basic]
Public Sub Play()
[C#]
public void Play();

Remarks

When used in a callback, plays the sound effect specified by LiveSound.Source. No effect when called in a postback.

Example

[Visual Basic, C#] The following example demonstrates adding items to a Live List control from a database, as well as updating a LiveImage control.

[Visual Basic]
'In this example, items are added to a Live List using Items.Add
'The items are sounds to be played, located in a "sounds" folder
'When one of the items is selected, the corresponding sound is played
'LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    'Add items to the Live list control via the ListItemCollection
    LiveList1.Items.Add("chord.wav")
    LiveList1.Items.Add("chimes.wav")
    LiveList1.Items.Add("exclamation.wav")
    LiveList1.Items.Add("error.wav")
End Sub

Private Sub LiveList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveList1.SelectedIndexChanged
    'When an item in the LiveList is selected or de-selected
    'The selected sound that is topmost in the list will play
    If (LiveList1.SelectedIndex > -1) Then
        LiveSound1.Source = "sounds/" + LiveList1.Items(LiveList1.SelectedIndex).ToString()
        LiveSound1.Play()
    End If
End Sub
                    [C#]
//In this example, items are added to a Live List using Items.Add
//The items are sounds to be played, located in a "sounds" folder
//When one of the items is selected, the corresponding sound is played
//LiveList1 could be a LiveListBox, LiveDropDownList, LiveRadioButtonList or LiveCheckBoxList

private void LiveButton1_Click(object sender, System.EventArgs e)
{
    //Add items to the Live List control via the ListItemCollection
    LiveList1.Items.Add("chord.wav");
    LiveList1.Items.Add("chimes.wav");
    LiveList1.Items.Add("exclamation.wav");
    LiveList1.Items.Add("error.wav");
}

private void LiveList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    //When an item in the Live List is selected or de-selected
    //The selected sound that is topmost in the list will play
    if (LiveList1.SelectedIndex > -1)
    {
        LiveSound1.Source = "sounds/" + LiveList1.Items[LiveList1.SelectedIndex];
        LiveSound1.Play();
    }
}

See Also

LiveSound Class | LiveSound Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox Class

Displays a text box control for user input.

For a list of all members of this type, see LiveTextBox Members.

System.Object
Control
WebControl
TextBox
LiveTextBox

[Visual Basic]
Public Class LiveTextBox
Inherits TextBox
Implements ILiveControl, ILiveWebControl, ILiveCallbackHandler
[C#]
public class LiveTextBox : TextBox, ILiveControl, ILiveWebControl, ILiveCallbackHandler

Remarks

The LiveTextBox server control is an input control that lets the user enter text. By default, the TextMode property of the control is set to TextBoxMode.SingleLine, which displays a single-line text box. However, the LiveTextBox control can also display a multiline text box or a text box that masks user input by changing the value of the TextMode property to TextBoxMode.MultiLine or TextBoxMode.Password, respectively. The text displayed in the LiveTextBox control is specified or determined by using the LiveTextBox.Text property.

The LiveTextBox control contain several properties that allow you to control the appearance of the control. The display width of the text box, in characters, is determined by its Columns property. If the LiveTextBox control is a multiline text box, the number of rows it displays is determined by the Rows property. To display text that wraps within the LiveTextBox control, set the Wrap property to true.

You can also specify how data is entered into the LiveTextBox control by setting a few properties. To prevent the text displayed in the control from being modified, set the ReadOnly property to true. If you want to limit the user input to a specified number of characters, set the MaxLength property.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox Members

Public Instance Constructors

LiveTextBox Constructor Initializes a new instance of LiveTextBox.

Public Instance Properties

AccessKey (inherited from WebControl) | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the Web server control.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether an automatic postback (or callback) to the server will occur whenever the user modifies the text in the LiveControls.LiveTextBox control and then tabs out of the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Columns (inherited from TextBox) | Gets or sets the display width of the text box in characters.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
MaxLength (inherited from TextBox) | Gets or sets the maximum number of characters allowed in the text box.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ReadOnly (inherited from TextBox) | Gets or sets a value indicating whether the contents of the TextBox control can be changed.
Rows (inherited from TextBox) | Gets or sets the display height of a multiline text box.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text content of the LiveControls.LiveTextBox control.
TextMode (inherited from TextBox) | Gets or sets the behavior mode of the text box.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.
Wrap (inherited from TextBox) | Gets or sets a value indicating whether the text content wraps within the text box.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
TextChanged (inherited from TextBox) | Occurs when the content of the text box is changed upon server postback.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

See Also

LiveTextBox Class | Dart.PowerWEB.LiveControls Namespace


LiveTextBox Constructor

Initializes a new instance of LiveTextBox.

[Visual Basic]
Public Sub New()
[C#]
public LiveTextBox();

Remarks

The default constructor initializes a new instance of LiveTextBox.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox Properties

The properties of the LiveTextBox class are listed below. For a complete list of LiveTextBox class members, see the LiveTextBox Members topic.

Public Instance Properties

AccessKey (inherited from WebControl) | Gets or sets the access key (underlined letter) that allows you to quickly navigate to the Web server control.
Attributes (inherited from WebControl) | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.
AutoPostBack | Gets or sets a value indicating whether an automatic postback (or callback) to the server will occur whenever the user modifies the text in the LiveControls.LiveTextBox control and then tabs out of the control.
BackColor | Gets or sets the background color of the LiveControl.
BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BorderColor | Gets or sets the border color of the LiveControl.
BorderStyle | Gets or sets the border style of the LiveControl.
BorderWidth | Gets or sets the border width of the LiveControl.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Columns (inherited from TextBox) | Gets or sets the display width of the text box in characters.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
ControlStyle (inherited from WebControl) | Gets the style of the Web server control. This property is used primarily by control developers.
ControlStyleCreated (inherited from WebControl) | Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.
CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
Display | Gets or sets a value indicating whether the LiveControl is visible.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets a value indicating whether the LiveControl is enabled.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
Font | Obsolete. Gets the font properties associated with the LiveControl.
FontEx | Gets the font properties associated with the LiveControl.
ForeColor | Gets or sets the foreground color (typically the color of the text) of the LiveControl.
Height | Gets or sets the height of the LiveControl.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
IsCallback | Gets the callback state of the LiveControl.
Left | Gets or sets the left position of the LiveControl.
MaxLength (inherited from TextBox) | Gets or sets the maximum number of characters allowed in the text box.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ReadOnly (inherited from TextBox) | Gets or sets a value indicating whether the contents of the TextBox control can be changed.
Rows (inherited from TextBox) | Gets or sets the display height of a multiline text box.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Style (inherited from WebControl) | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.
TabIndex | Gets or sets the tab index of the LiveControl.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
Text | Gets or sets the text content of the LiveControls.LiveTextBox control.
TextMode (inherited from TextBox) | Gets or sets the behavior mode of the text box.
ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.
Top | Gets or sets the top position of the LiveControl.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible | Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.
Width | Gets or sets the width of the LiveControl.
Wrap (inherited from TextBox) | Gets or sets a value indicating whether the text content wraps within the text box.

See Also

LiveTextBox Class | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.AutoPostBack Property

Gets or sets a value indicating whether an automatic postback (or callback) to the server will occur whenever the user modifies the text in the LiveControls.LiveTextBox control and then tabs out of the control.

[Visual Basic]
Overrides Public Property AutoPostBack As Boolean
[C#]
public override bool AutoPostBack {get; set;}

Property Value

true if a postback (or callback) to the server automatically occurs whenever the user changes the LiveControl's checked state or selection of its list; otherwise, false. The default is true, which is different than the LiveControl's non-Live counterpart.

Remarks

Use the AutoPostBack property to specify whether an automatic postback (or callback) to the server will occur whenever the user modifies the text in the LiveControls.LiveTextBox control and then tabs out of the control.

Note Postback (or callback) only occurs when the text box loses focus after the contents are changed.

Note When AutoPostBack is true and ILiveCallbackHandler.EnableCallback is true, the LiveControls.LiveTextBox will perform automatic callbacks. If ILiveCallbackHandler.EnableCallback is false, traditional postbacks will occur.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.BackColor Property

Gets or sets the background color of the LiveControl.

[Visual Basic]
Overrides Public Property BackColor As Color
[C#]
public override System.Drawing.Color BackColor {get; set;}

Property Value

A Color that represents the background color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BackColor property to specify the background color of the LiveControl. This property is set using a Color object.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.BorderColor Property

Gets or sets the border color of the LiveControl.

[Visual Basic]
Overrides Public Property BorderColor As Color
[C#]
public override System.Drawing.Color BorderColor {get; set;}

Property Value

A Color that represents the border color of the control. The default is Color.Empty, which indicates that this property is not set.

Remarks

Use the BorderColor property to specify the border color of the LiveControl. This property is set using a Color object.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.BorderStyle Property

Gets or sets the border style of the LiveControl.

[Visual Basic]
Overrides Public Property BorderStyle As BorderStyle
[C#]
public override System.Web.UI.WebControls.BorderStyle BorderStyle {get; set;}

Property Value

One of the BorderStyle enumeration values. The default is NotSet.

Remarks

Use the BorderStyle property to specify the border style for the LiveControl. This property is set using one of the BorderStyle enumeration values.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.BorderWidth Property

Gets or sets the border width of the LiveControl.

[Visual Basic]
Overrides Public Property BorderWidth As Unit
[C#]
public override System.Web.UI.WebControls.Unit BorderWidth {get; set;}

Property Value

A Unit that represents the border width of a LiveControl. The default value is Unit.Empty, which indicates that this property is not set.

Remarks

Use the BorderWidth property to specify a border width for a control.

Note This property does not work with all LiveControls. It applies only to controls that display as a table, such as LiveControls.LiveDataGrid.

This property is set with a Unit object. If the Value property of the Unit contains a negative number, an exception is thrown.

Note The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

Exceptions

Exception Type | Condition
ArgumentException | The specified border width is a negative value.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.CssClass Property

Gets or sets the Cascading Style Sheet (CSS) class rendered by the LiveControl on the client.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

The CSS class rendered by the LiveControl on the client. The default is String.Empty.

Remarks

Use the CssClass property to specify the CSS class to render on the client for the LiveControl. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

For example, suppose you have the following LiveControl declaration:

<asp:TextBox id="LiveTextBox1" ForeColor="Red" CssClass="class1" />

The following HTML is rendered on the client for the previous LiveControl declaration:

<input type=text class="class1" style="ForeColor:red">

Note On browsers that do not support CSS, setting the CssClass property will have no effect.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.Display Property

Gets or sets a value indicating whether the LiveControl is visible.

[Visual Basic]
NotOverridable Public Property Display As Boolean Implements _
   ILiveWebControl.Display
[C#]
public bool Display {get; set;}

Property Value

true if control is visible; otherwise, false. The default is true.

Implements

ILiveWebControl.Display

Remarks

Use the Display property to specify or determine whether a control is visible. When set to false, the control is rendered, but is hidden.

Note Use this property instead of Visible.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.Enabled Property

Gets or sets a value indicating whether the LiveControl is enabled.

[Visual Basic]
Overrides Public Property Enabled As Boolean
[C#]
public override bool Enabled {get; set;}

Property Value

true if control is enabled; otherwise, false. The default is true.

Remarks

Use the Enabled property to specify or determine whether a control is functional. When set to false, the control appears dimmed, preventing any input from being entered in the control.

Note The ability to enable or disable functionality is always available. However, dimming and locking the control only works in Microsoft Internet Explorer version 4 and later.

This property propagates down the control hierarchy. Therefore, disabling a container control will disable all child controls within that container.

Note Not all controls support this property. See the individual controls for details.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.Font Property

Obsolete. Gets the font properties associated with the LiveControl.

[Visual Basic]
Overrides Public ReadOnly Property Font As FontInfo
[C#]
public override System.Web.UI.WebControls.FontInfo Font {get;}

Property Value

A FontInfo that represents the font properties of the LiveControl.

Remarks

This property is obsolete in LiveControls. The ILiveWebControl.FontEx should be used instead.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.FontEx Property

Gets the font properties associated with the LiveControl.

[Visual Basic]
NotOverridable Public ReadOnly Property FontEx As LiveFontInfo Implements _
   ILiveWebControl.FontEx
[C#]
public LiveFontInfo FontEx {get;}

Property Value

A LiveControls.LiveFontInfo that represents the font properties of the LiveControl.

Implements

ILiveWebControl.FontEx

Remarks

Use the FontEx property to specify the font properties of the LiveControl. This property includes subproperties that can be accessed declaratively in the form of Property-Subproperty (for example FontEx.Bold) or programmatically in the form of Property.Subproperty (for example FontEx.Bold).

All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: LiveFontInfo.Bold, LiveFontInfo.Italic, LiveFontInfo.Name, LiveFontInfo.Names, LiveFontInfo.Strikeout, LiveFontInfo.Underline, and LiveFontInfo.Size (but only named font sizes, such as Small, Smaller, and so on, will work).

Note Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

The one subproperty that will not render on earlier browsers for all controls is LiveFontInfo.Overline.

This property is Live, and used in place of the Font property.

Note The Font property can be set for Non-LiveControls, and it will be updated during callbacks. However, for LiveControls, the FontEx property must be used instead.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the LiveControl.

[Visual Basic]
Overrides Public Property ForeColor As Color
[C#]
public override System.Drawing.Color ForeColor {get; set;}

Property Value

A Color that represents the foreground color of the control. The default is Color.Empty.

Remarks

Use the ForeColor property to specify the foreground color of the LiveControl. The foreground color is usually the color of the text.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.Height Property

Gets or sets the height of the LiveControl.

[Visual Basic]
Overrides Public Property Height As Unit
[C#]
public override System.Web.UI.WebControls.Unit Height {get; set;}

Property Value

A Unit that represents the height of the control. The default is Unit.Empty.

Remarks

Use the Height property to specify the height of the LiveControl.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.Left Property

Gets or sets the left position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Left As Unit Implements _
   ILiveWebControl.Left
[C#]
public System.Web.UI.WebControls.Unit Left {get; set;}

Property Value

A Unit that represents the left position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Left

Remarks

Use the Left property to specify the left position of the LiveControl. If both Left and ILiveWebControl.Top are Unit.Empty (the default), relative positioning is used. If either Left or ILiveWebControl.Top are not Unit.Empty, absolute positioning is used.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.TabIndex Property

Gets or sets the tab index of the LiveControl.

[Visual Basic]
Overrides Public Property TabIndex As Short
[C#]
public override short TabIndex {get; set;}

Property Value

The tab index of the LiveControl. The default is 0, which indicates that this property is not set.

Remarks

Use the TabIndex property to specify or determine the tab index of a LiveControl on the Web Forms page. When you press the Tab key, the order in which the LiveControls receive focus is determined by the TabIndex property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

Note Only controls with a nonzero tab index will render the tabindex attribute.

You can remove a LiveControl from the tab order by setting the TabIndex property to a negative value.

Exceptions

Exception Type | Condition
ArgumentOutOfRangeException | The specified tab index is not between -32768 and 32767.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.Text Property

Gets or sets the text content of the LiveControls.LiveTextBox control.

[Visual Basic]
Overrides Public Property Text As String
[C#]
public override string Text {get; set;}

Property Value

The text displayed in the LiveControls.LiveTextBox control. The default is an empty string ("").

Remarks

Use the Text property to specify or determine the text displayed in the LiveControls.LiveTextBox control. To limit the number of characters accepted by the control, set the MaxLength property. If you want to prevent the text from being modified, set the ReadOnly property.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.ToolTip Property

Gets or sets the text displayed when the mouse pointer hovers over the LiveControl.

[Visual Basic]
Overrides Public Property ToolTip As String
[C#]
public override string ToolTip {get; set;}

Property Value

The text displayed when the mouse pointer hovers over the LiveControl. The default is String.Empty.

Remarks

Use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the LiveControl.

Note This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.Top Property

Gets or sets the top position of the LiveControl.

[Visual Basic]
NotOverridable Public Property Top As Unit Implements _
   ILiveWebControl.Top
[C#]
public System.Web.UI.WebControls.Unit Top {get; set;}

Property Value

A Unit that represents the top position of the control. The default is Unit.Empty.

Implements

ILiveWebControl.Top

Remarks

Use the Top property to specify the top position of the LiveControl. If both ILiveWebControl.Left and Top are Unit.Empty (the default), relative positioning is used. If either ILiveWebControl.Left or Top are not Unit.Empty, absolute positioning is used.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.Visible Property

Obsolete. Gets or sets a value that indicates whether a server control is rendered as UI on the page.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}

Property Value

true if the control is visible on the page; otherwise false.

Remarks

This property is obsolete in LiveControls. Use the ILiveWebControl.Display property instead.

If this property is false, the server control is not rendered. You should take this into account when organizing the lay out of your page.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.Width Property

Gets or sets the width of the LiveControl.

[Visual Basic]
Overrides Public Property Width As Unit
[C#]
public override System.Web.UI.WebControls.Unit Width {get; set;}

Property Value

A Unit that represents the width of the control. The default is Unit.Empty.

Remarks

Use the Width property to specify the width of the LiveControl.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox Methods

The methods of the LiveTextBox class are listed below. For a complete list of LiveTextBox class members, see the LiveTextBox Members topic.

Public Instance Methods

ApplyStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
CopyBaseAttributes (inherited from WebControl) | Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
MergeStyle (inherited from WebControl) | Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
RenderBeginTag (inherited from WebControl) | Renders the HTML opening tag of the control into the specified writer. This method is used primarily by control developers.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
RenderEndTag (inherited from WebControl) | Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IAttributeAccessor.GetAttribute (inherited from WebControl) |
IAttributeAccessor.SetAttribute (inherited from WebControl) |
IParserAccessor.AddParsedSubObject (inherited from Control) |
IPostBackDataHandler.LoadPostData | When implemented by a class, processes post back data for an ASP.NET server control.
IPostBackDataHandler.RaisePostDataChangedEvent | When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

See Also

LiveTextBox Class | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.GetCallbackEventReference Method

Returns JavaScript that can be used to initiate a callback to the server.

[Visual Basic]
Public Function GetCallbackEventReference( _
   ByVal eventName As String, _
   ByVal argument As String _
) As String
[C#]
public string GetCallbackEventReference(
   string eventName,
   string argument
);

Parameters

eventName
The event corresponding to the callback.
argument
The event arguments for the callback.

Remarks

Returns JavaScript that can be used to initiate a callback to the server.

The settings of the LiveControl (blocking, errorhandling, etc) are automatically taken into account.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.IPostBackDataHandler.LoadPostData Method

When implemented by a class, processes post back data for an ASP.NET server control.

[Visual Basic]
Function LoadPostData( _
   ByVal postDataKey As String, _
   ByVal postCollection As NameValueCollection _
) As Boolean Implements _
   IPostBackDataHandler.LoadPostData
[C#]
new bool IPostBackDataHandler.LoadPostData(
   string postDataKey,
   NameValueCollection postCollection
);

Parameters

postDataKey
The key identifier for the control.
postCollection
The collection of all incoming name values.

Implements

IPostBackDataHandler.LoadPostData

Remarks

The Web Forms page framework tracks all the server control's that return true to this method call, then invokes the IPostBackDataHandler.RaisePostDataChangedEvent on those controls.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.IPostBackDataHandler.RaisePostDataChangedEvent Method

When implemented by a class, signals the server control object to notify the ASP.NET application that the state of the control has changed.

[Visual Basic]
Sub RaisePostDataChangedEvent() Implements _
   IPostBackDataHandler.RaisePostDataChangedEvent
[C#]
new void IPostBackDataHandler.RaisePostDataChangedEvent();

Implements

IPostBackDataHandler.RaisePostDataChangedEvent

Remarks

Change events for the server control that implements this interface, if any, are raised from this method.

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox Events

The events of the LiveTextBox class are listed below. For a complete list of LiveTextBox class members, see the LiveTextBox Members topic.

Public Instance Events

ContextMenuChanged | Occurs when the right button of the LiveControl is clicked.
DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
DoubleClick | Occurs when the control is double-clicked.
GotFocus | Occurs when the LiveControl gains focus.
HelpRequested | Occurs when F1 is pressed while the control has focus.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
KeyDown | Occurs when a key is down while the control has focus.
KeyPress | Occurs when a key is pressed while the control has focus.
KeyUp | Occurs when a key is released while the control has focus.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
LocationClick | Occurs when the LiveControl is clicked, providing location data.
LostFocus | Occurs when the LiveControl loses focus.
MouseDown | Occurs when the mouse buttons are pressed while the LiveControl has focus.
MouseEnter | Occurs when the mouse pointer enters the LiveControl.
MouseLeave | Occurs when the mouse pointer leaves the LiveControl.
MouseUp | Occurs when the mouse buttons are released while the LiveControl has focus.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
TextChanged (inherited from TextBox) | Occurs when the content of the text box is changed upon server postback.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveTextBox Class | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.ContextMenuChanged Event

Occurs when the right button of the LiveControl is clicked.

[Visual Basic]
Public Event ContextMenuChanged As LocationEventHandler
[C#]
public event LocationEventHandler ContextMenuChanged;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.ContextMenuChanged

Remarks

The ContextMenuChanged event fires when the right button is clicked. This event is the equivalent of the Click event for the left button.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.DoubleClick Event

Occurs when the control is double-clicked.

[Visual Basic]
Public Event DoubleClick As LocationEventHandler
[C#]
public event LocationEventHandler DoubleClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.DoubleClick

Remarks

The DoubleClick event fires when the control is double-clicked.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.GotFocus Event

Occurs when the LiveControl gains focus.

[Visual Basic]
Public Event GotFocus As EventHandler
[C#]
public event EventHandler GotFocus;

Implements

ILiveWebControl.GotFocus

Remarks

The GotFocus event fires when the LiveControl gains focus. ILiveWebControl.LostFocus fires when the LiveControl loses focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.HelpRequested Event

Occurs when F1 is pressed while the control has focus.

[Visual Basic]
Public Event HelpRequested As LocationEventHandler
[C#]
public event LocationEventHandler HelpRequested;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.HelpRequested

Remarks

The HelpRequested event fires when F1 is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.KeyDown Event

Occurs when a key is down while the control has focus.

[Visual Basic]
Public Event KeyDown As KeyEventHandler
[C#]
public event KeyEventHandler KeyDown;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyDown

Remarks

The KeyDown event fires when a key is down while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.KeyPress Event

Occurs when a key is pressed while the control has focus.

[Visual Basic]
Public Event KeyPress As KeyEventHandler
[C#]
public event KeyEventHandler KeyPress;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyPress

Remarks

The KeyPress event fires when a key is pressed while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.KeyUp Event

Occurs when a key is released while the control has focus.

[Visual Basic]
Public Event KeyUp As KeyEventHandler
[C#]
public event KeyEventHandler KeyUp;

Event Data

The event handler receives an argument of type KeyEventArgs containing data related to this event. The following KeyEventArgs properties provide information specific to this event.

Property | Description
Alt | Gets a value indicating whether the ALT key was pressed.
Control | Gets a value indicating whether the CTRL key was pressed.
KeyCode | Gets the keyboard code for a KeyEventArgs.KeyDown, KeyEventArgs.KeyPress or KeyEventArgs.KeyUp event.
Shift | Gets a value indicating whether the SHIFT key was pressed.

Implements

ILiveWebControl.KeyUp

Remarks

The KeyUp event fires when a key is released while the control has focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.LocationClick Event

Occurs when the LiveControl is clicked, providing location data.

[Visual Basic]
Public Event LocationClick As LocationEventHandler
[C#]
public event LocationEventHandler LocationClick;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.LocationClick

Remarks

The LocationClick event fires when the LiveControl is clicked, providing Top and Left location data.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.LostFocus Event

Occurs when the LiveControl loses focus.

[Visual Basic]
Public Event LostFocus As EventHandler
[C#]
public event EventHandler LostFocus;

Implements

ILiveWebControl.LostFocus

Remarks

The LostFocus event fires when the LiveControl loses focus. ILiveWebControl.GotFocus fires when the LiveControl gains focus.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.MouseDown Event

Occurs when the mouse buttons are pressed while the LiveControl has focus.

[Visual Basic]
Public Event MouseDown As LocationEventHandler
[C#]
public event LocationEventHandler MouseDown;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseDown

Remarks

The MouseDown event fires when any button is pressed.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.MouseEnter Event

Occurs when the mouse pointer enters the LiveControl.

[Visual Basic]
Public Event MouseEnter As LocationEventHandler
[C#]
public event LocationEventHandler MouseEnter;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseEnter

Remarks

The MouseEnter event fires when the mouse pointer enters the LiveControl. ILiveWebControl.MouseLeave will fire when the mouse pointer leaves the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.MouseLeave Event

Occurs when the mouse pointer leaves the LiveControl.

[Visual Basic]
Public Event MouseLeave As LocationEventHandler
[C#]
public event LocationEventHandler MouseLeave;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseLeave

Remarks

The MouseLeave event fires when the mouse pointer leaves the LiveControl. ILiveWebControl.MouseEnter will fire when the mouse pointer enters the control.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTextBox.MouseUp Event

Occurs when the mouse buttons are released while the LiveControl has focus.

[Visual Basic]
Public Event MouseUp As LocationEventHandler
[C#]
public event LocationEventHandler MouseUp;

Event Data

The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.

Property | Description
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Implements

ILiveWebControl.MouseUp

Remarks

The MouseUp event fires when any button is released.

Example

[Visual Basic, C#] The following example demonstrates LiveControls events not found in other Server controls.

[Visual Basic]
'In this example, events fire as the user interacts with a Live Control
'These events are not found in non-Live Server controls
'When an event is raised, a LiveLabel updates with a message

Private Sub LiveLabel1_ContextMenuChanged(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.ContextMenuChanged
    LiveLabel1.Text = "You pressed the right button"
End Sub

Private Sub LiveLabel1_DoubleClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.DoubleClick
    LiveLabel1.Text = "That was a nice double-click"
End Sub

Private Sub LiveLabel1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.GotFocus
    LiveLabel1.Text = "I am focused"
End Sub

Private Sub LiveLabel1_HelpRequested(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.HelpRequested
    LiveLabel1.Text = "You pressed F1  Need some help?"
End Sub

Private Sub LiveLabel1_KeyDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyDown
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub

Private Sub LiveLabel1_KeyPress(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyPress
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub

Private Sub LiveLabel1_KeyUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.KeyEventArgs) Handles LiveLabel1.KeyUp
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub

Private Sub LiveLabel1_LocationClick(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.LocationClick
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub

Private Sub LiveLabel1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveLabel1.LostFocus
    LiveLabel1.Text = "I'm losing focus"
End Sub

Private Sub LiveLabel1_MouseDown(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseDown
    LiveLabel1.Text = "Down goes the mouse button"
End Sub

Private Sub LiveLabel1_MouseEnter(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseEnter
    LiveLabel1.Text = "That tickles"
End Sub

Private Sub LiveLabel1_MouseLeave(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseLeave
    LiveLabel1.Text = "Come back"
End Sub

Private Sub LiveLabel1_MouseUp(ByVal sender As Object, ByVal e As Dart.PowerWEB.LiveControls.LocationEventArgs) Handles LiveLabel1.MouseUp
    LiveLabel1.Text = "Up goes the mouse button"
End Sub
                    [C#]
//In this example, events fire as the user interacts with a Live Control
//These events are not found in non-Live Server controls
//When an event is raised, a LiveLabel updates with a message

private void LiveControl1_ContextMenuChanged(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed the right button!";
}

private void LiveControl1_DoubleClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That was a nice double-click!";
}

private void LiveControl1_GotFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I am focused!";
}

private void LiveControl1_HelpRequested(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "You pressed F1!  Need some help?";
}

private void LiveControl1_KeyDown(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down!";
}

private void LiveControl1_KeyPress(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed!";
}

private void LiveControl1_KeyUp(object sender, Dart.PowerWEB.LiveControls.KeyEventArgs e)
{
    LiveLabel1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up!";
}

private void LiveControl1_LocationClick(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")!";
}

private void LiveControl1_LostFocus(object sender, System.EventArgs e)
{
    LiveLabel1.Text = "I'm losing focus!";
}

private void LiveControl1_MouseDown(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Down goes the mouse button!";
}

private void LiveControl1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "That tickles!";
}

private void LiveControl1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Come back!";
}

private void LiveControl1_MouseUp(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.Text = "Up goes the mouse button!";
}

See Also

LiveTextBox Class | LiveTextBox Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer Class

Implements a timer that raises an event at user-defined intervals.

For a list of all members of this type, see LiveTimer Members.

System.Object
Control
LiveTimer

[Visual Basic]
Public Class LiveTimer
Inherits Control
Implements ILiveControl, ILiveCallbackHandler, IPostBackEventHandler
[C#]
public class LiveTimer : Control, ILiveControl, ILiveCallbackHandler, IPostBackEventHandler

Remarks

A LiveTimer is used to raise an event at user-defined intervals. When using the timer, use the LiveTimer.Tick event to perform a polling operation or to display a splash screen for a specified amount of time. Whenever the LiveTimer.Enabled property is set to true and the LiveTimer.Interval property is greater than zero, the LiveTimer.Tick event is raised at intervals based on the LiveTimer.Interval property setting.

Note Due to network lag and other considerations, the LiveTimer interval will not be as precise as a Windows application Timer. Also, the LiveTimer.Interval should be large enough to account for possible delays such as network lag.

This class provides methods to set the interval, and to start and stop the timer.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer Members

Public Instance Constructors

LiveTimer Constructor Initializes a new instance of LiveTimer.

Public Instance Properties

BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets whether the timer is running.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
Interval | Gets or sets the time interval (in milliseconds) for which the Timer.Tick event is raised.
IsCallback | Gets the callback state of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible (inherited from Control) | Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.

Public Instance Methods

DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
Start | Starts the timer.
Stop | Stops the timer.
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Tick | Occurs periodically based on the LiveTimer.Interval property.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

Explicit Interface Implementations

IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveTimer Class | Dart.PowerWEB.LiveControls Namespace


LiveTimer Constructor

Initializes a new instance of LiveTimer.

[Visual Basic]
Public Sub New()
[C#]
public LiveTimer();

Remarks

The default constructor initializes a new instance of LiveTimer.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer Properties

The properties of the LiveTimer class are listed below. For a complete list of LiveTimer class members, see the LiveTimer Members topic.

Public Instance Properties

BindingContainer (inherited from Control) |
Blocking | Gets or sets the blocking state of the control.
BrowserType | Gets or sets the type of browser as detected by the LiveControl.
BufferedScript | Gets the client-side script which will be written to the response stream when the callback request is ended.
ClientID (inherited from Control) | Gets the server control identifier generated by ASP.NET.
Controls (inherited from Control) | Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
DataPersistenceType | Gets or sets where data is persisted between callbacks.
EnableCallback | Gets or sets whether the control issues a callback.
Enabled | Gets or sets whether the timer is running.
EnableViewState (inherited from Control) | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.
ErrorBehavior | Gets or sets how errors are handled by the control.
ErrorMessage | Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
Interval | Gets or sets the time interval (in milliseconds) for which the Timer.Tick event is raised.
IsCallback | Gets the callback state of the LiveControl.
NamingContainer (inherited from Control) | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.
Page (inherited from Control) | Gets a reference to the Page instance that contains the server control.
Parent (inherited from Control) | Gets a reference to the server control's parent control in the page control hierarchy.
ScriptsDirectory | Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.
Site (inherited from Control) | Gets information about the Web site to which the server control belongs.
Tag | Gets or sets a convertible object that contains data about the control.
TemplateSourceDirectory (inherited from Control) | Gets the virtual directory of the Page or UserControl that contains the current server control.
UniqueID (inherited from Control) | Gets the unique, hierarchically-qualified identifier for the server control.
Visible (inherited from Control) | Gets or sets a value that indicates whether a server control is rendered as UI on the page.
WaitElementID | Gets or sets the message ID of the HTML element to display a message during a pending callback.
WaitMessage | Gets or sets the message to display during a pending callback.

See Also

LiveTimer Class | Dart.PowerWEB.LiveControls Namespace


LiveTimer.Blocking Property

Gets or sets the blocking state of the control.

[Visual Basic]
NotOverridable Public Property Blocking As Boolean Implements _
   ILiveCallbackHandler.Blocking
[C#]
public bool Blocking {get; set;}

Property Value

true if other LiveControls should be disabled while the LiveControl has a pending callback.

Implements

ILiveCallbackHandler.Blocking

Remarks

Although callbacks always occur asynchronously, when this property is true, a simulated blocking will be used. The interface will be disabled and updated as busy when a callback is pending (although the code itself will not block).

Note Only LiveControls will be blocked. The user will still be able to interact with non-LiveControls.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.BrowserType Property

Gets or sets the type of browser as detected by the LiveControl.

[Visual Basic]
NotOverridable Public Property BrowserType As BrowserType Implements _
   ILiveControl.BrowserType
[C#]
public BrowserType BrowserType {get; set;}

Property Value

A LiveControls.BrowserType that represents the browser rendering the LiveControl.

Implements

ILiveControl.BrowserType

Remarks

This property is set when the LiveControl is initialized, based on the user-agent header sent by the browser. BrowserType can also be set to override the detected value with a custom browser detection algorithm.

Note This property is global to all LiveControls. Any change to an individual LiveControl will automatically be applied to all LiveControls on the form. It is not possible to have LiveControls with different LiveControls.BrowserType values on the same form.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.BufferedScript Property

Gets the client-side script which will be written to the response stream when the callback request is ended.

[Visual Basic]
NotOverridable Public ReadOnly Property BufferedScript As StringWriter Implements _
   ILiveControl.BufferedScript
[C#]
public System.IO.StringWriter BufferedScript {get;}

Property Value

A StringWriter object that contains buffered script for a callback response.

Implements

ILiveControl.BufferedScript

Remarks

Use the BufferedScript property to modify the client-side script to be sent in response to a callback.

For example, to dynamically change the flow of a label (from bottom to top instead of left to right):

LiveLabel1.BufferedScript.Write(LiveLabel1.GetScriptStyleReference() + ".writingMode = 'tb-rl';");

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.DataPersistenceType Property

Gets or sets where data is persisted between callbacks.

[Visual Basic]
NotOverridable Public Property DataPersistenceType As DataPersistenceType Implements _
   ILiveControl.DataPersistenceType
[C#]
public DataPersistenceType DataPersistenceType {get; set;}

Property Value

A LiveControls.DataPersistenceType that represents where data is persisted between callbacks. Defaults to DataPersistence.Session.

Implements

ILiveControl.DataPersistenceType

Remarks

Set DataPersistenceType to DataPersistence.Session to persist data in session variables. Set DataPersistenceType to DataPersistence.ViewState to persist data in the ViewState.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.EnableCallback Property

Gets or sets whether the control issues a callback.

[Visual Basic]
NotOverridable Public Property EnableCallback As Boolean Implements _
   ILiveCallbackHandler.EnableCallback
[C#]
public bool EnableCallback {get; set;}

Property Value

true if the LiveControl uses callbacks. When false, the LiveControl uses traditional postbacks.

Implements

ILiveCallbackHandler.EnableCallback

Remarks

Set EnableCallback to true for the LiveControl to use callbacks, as opposed to traditional postbacks.

Set to false to force the control to behave like its non-live counterpart.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.Enabled Property

Gets or sets whether the timer is running.

[Visual Basic]
Public Property Enabled As Boolean
[C#]
public bool Enabled {get; set;}

Property Value

true if the timer is currently enabled; otherwise, false. The default is false.

Remarks

Use this property to start the timer.

LiveTimer.Start sets Enabled to true, LiveTimer.Stop sets Enabled to false.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.ErrorBehavior Property

Gets or sets how errors are handled by the control.

[Visual Basic]
NotOverridable Public Property ErrorBehavior As ErrorBehavior Implements _
   ILiveCallbackHandler.ErrorBehavior
[C#]
public ErrorBehavior ErrorBehavior {get; set;}

Property Value

An LiveControls.ErrorBehavior enumerated value. Defaults to ErrorBehavior.ShowInBrowser.

Implements

ILiveCallbackHandler.ErrorBehavior

Remarks

Set ErrorBehavior to specify whether an exception raised by the LiveControl should cause an error page, an alert box, or no indication to appear.

If set to ErrorBehavior.ShowAlert, set the alert message using the ILiveCallbackHandler.ErrorMessage property.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.ErrorMessage Property

Gets or sets the message that is displayed if an error occurs and ILiveCallbackHandler.ErrorBehavior is ErrorBehavior.ShowAlert.

[Visual Basic]
NotOverridable Public Property ErrorMessage As String Implements _
   ILiveCallbackHandler.ErrorMessage
[C#]
public string ErrorMessage {get; set;}

Property Value

A message to display when an error occurs.

Implements

ILiveCallbackHandler.ErrorMessage

Remarks

Set ErrorMessage to specify the contents of the Alert. Alternatively, set ILiveCallbackHandler.ErrorBehavior to ErrorBehavior.ShowInBrowser to see specific error information.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.Interval Property

Gets or sets the time interval (in milliseconds) for which the Timer.Tick event is raised.

[Visual Basic]
Public Property Interval As Integer
[C#]
public int Interval {get; set;}

Property Value

The time interval between LiveTimer.Tick events for the LiveControls.LiveTimer control. The default is 5000.

Remarks

Use this property to specify the time interval (in milliseconds) for which the Timer.Tick event is raised.

This property does not have any effect unless the LiveControls.LiveTimer is enabled, either by setting Enabled to true, or by calling LiveTimer.Start

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.IsCallback Property

Gets the callback state of the LiveControl.

[Visual Basic]
NotOverridable Public Property IsCallback As Boolean Implements _
   ILiveControl.IsCallback
[C#]
public bool IsCallback {get; set;}

Property Value

true if the LiveControl is currently in a callback state, false otherwise.

Implements

ILiveControl.IsCallback

Remarks

Use the IsCallback property to differentiate between a postback and live callback.

Note This property is global to all LiveControls.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.ScriptsDirectory Property

Gets or sets a virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl.

[Visual Basic]
NotOverridable Public Property ScriptsDirectory As String Implements _
   ILiveControl.ScriptsDirectory
[C#]
public string ScriptsDirectory {get; set;}

Property Value

A string representing the virtual, relative, or absolute pathname of the directory containing all of the scripts used by the LiveControl. The default value is "/PowerWEB_LiveControls_Common/scripts".

Implements

ILiveControl.ScriptsDirectory

Remarks

If you installed PowerWEB LiveControls for .NET, the installation kit will create the proper virtual directory structure, enabling you to easily create new applications using the LiveControls without further configuration. However, if you must place your web application on a new machine that you cannot install the product on (perhaps in a deployment scenario), you must change the value of this property to reference the new scripts location. See the Deployment topic for more information.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.Tag Property

Gets or sets a convertible object that contains data about the control.

[Visual Basic]
NotOverridable Public Property Tag As Object Implements _
   ILiveControl.Tag
[C#]
public object Tag {get; set;}

Property Value

An object that implements the IConvertible interface and contains data about the LiveControl. The default is a null reference (Nothing in Visual Basic).

Implements

ILiveControl.Tag

Remarks

Any type that implements IConvertible can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.

Data contained within the Tag property persists across callbacks. A common use for the Tag property is to store data that is closely associated with the control.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.WaitElementID Property

Gets or sets the message ID of the HTML element to display a message during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitElementID As String Implements _
   ILiveCallbackHandler.WaitElementID
[C#]
public string WaitElementID {get; set;}

Property Value

The ID of an HTML element, such as a Label, that will display a message during pending callbacks.

Implements

ILiveCallbackHandler.WaitElementID

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitMessage property.

Set WaitElementID to specify the ID of the control that will display the ILiveCallbackHandler.WaitMessage during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing..") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.WaitMessage Property

Gets or sets the message to display during a pending callback.

[Visual Basic]
NotOverridable Public Property WaitMessage As String Implements _
   ILiveCallbackHandler.WaitMessage
[C#]
public string WaitMessage {get; set;}

Property Value

The message displayed during pending callbacks.

Implements

ILiveCallbackHandler.WaitMessage

Remarks

Use in conjunction with the ILiveCallbackHandler.WaitElementID property.

Set WaitMessage to specify the message displayed by the ILiveCallbackHandler.WaitElementID control during a pending callback.

Typical usage would be for immediately displaying a message (such as "Processing...") to the user during lengthy callbacks (due to network traffic or server side processing).

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer Methods

The methods of the LiveTimer class are listed below. For a complete list of LiveTimer class members, see the LiveTimer Members topic.

Public Instance Methods

DataBind (inherited from Control) | Binds a data source to the invoked server control and all its child controls.
Dispose (inherited from Control) | Enables a server control to perform final clean up before it is released from memory.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindControl (inherited from Control) | Searches the current naming container for a server control with the specified id parameter.
GetCallbackEventReference | Returns JavaScript that can be used to initiate a callback to the server.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetScript | Returns all JavaScript buffered up as a result of setting control properties.
GetScriptObjectReference | Returns a client-side reference to the element.
GetScriptStyleReference | Returns a client-side reference to the style object of the element.
GetType (inherited from Object) | Gets the Type of the current instance.
GetViewState | Returns the ViewState object used to save and restore state.
HasControls (inherited from Control) | Determines if the server control contains any child controls.
RenderControl (inherited from Control) | Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
ResolveUrl (inherited from Control) | Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
SetRenderMethodDelegate (inherited from Control) |
Start | Starts the timer.
Stop | Stops the timer.
ToString (inherited from Object) | Returns a String that represents the current Object.

Explicit Interface Implementations

IParserAccessor.AddParsedSubObject (inherited from Control)
IPostBackEventHandler.RaisePostBackEvent

See Also

LiveTimer Class | Dart.PowerWEB.LiveControls Namespace


LiveTimer.GetCallbackEventReference Method

Returns JavaScript that can be used to initiate a callback to the server.

[Visual Basic]
Public Function GetCallbackEventReference( _
   ByVal eventName As String, _
   ByVal argument As String _
) As String
[C#]
public string GetCallbackEventReference(
   string eventName,
   string argument
);

Parameters

eventName
The event corresponding to the callback.
argument
The event arguments for the callback.

Remarks

Returns JavaScript that can be used to initiate a callback to the server.

The settings of the LiveControl (blocking, errorhandling, etc) are automatically taken into account.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.GetScript Method

Returns all JavaScript buffered up as a result of setting control properties.

[Visual Basic]
NotOverridable Public Function GetScript() As String Implements _
   ILiveControl.GetScript
[C#]
public string GetScript();

Implements

ILiveControl.GetScript

Remarks

Returns all JavaScript buffered up as a result of setting properties of controls on the form.

Note This is not intended for use by end-users.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.GetScriptObjectReference Method

Returns a client-side reference to the element.

[Visual Basic]
NotOverridable Public Function GetScriptObjectReference() As String Implements _
   ILiveControl.GetScriptObjectReference
[C#]
public string GetScriptObjectReference();

Implements

ILiveControl.GetScriptObjectReference

Remarks

Returns a client-side reference to the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1")" (depending on the browser).

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.GetScriptStyleReference Method

Returns a client-side reference to the style object of the element.

[Visual Basic]
NotOverridable Public Function GetScriptStyleReference() As String Implements _
   ILiveControl.GetScriptStyleReference
[C#]
public string GetScriptStyleReference();

Implements

ILiveControl.GetScriptStyleReference

Remarks

Returns a client-side reference to the style object of the element corresponding to the LiveControl.

For example, if the LiveControl is LiveButton1, it would return "pwObj("LiveButton1").style" (depending on the browser).

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.GetViewState Method

Returns the ViewState object used to save and restore state.

[Visual Basic]
NotOverridable Public Function GetViewState() As Object Implements _
   ILiveControl.GetViewState
[C#]
public object GetViewState();

Implements

ILiveControl.GetViewState

Remarks

Returns the ViewState object used by LiveControls to save and restore state.

Note This is not intended for use by end-users.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.Start Method

Starts the timer.

[Visual Basic]
Public Sub Start()
[C#]
public void Start();

Remarks

Causes the Timer.Tick event to be raised in the interval specified by LiveTimer.Interval. This can be called in a callback or postback.

Note This method sets the LiveTimer.Enabled property of the LiveControls.LiveTimer control to true.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.Stop Method

Stops the timer.

[Visual Basic]
Public Sub Stop()
[C#]
public void Stop();

Remarks

Causes the Timer.Tick event to stop being raised.

Note This method sets the LiveTimer.Enabled property of the LiveControls.LiveTimer control to false.

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer.IPostBackEventHandler.RaisePostBackEvent Method

[Visual Basic]
Sub RaisePostBackEvent( _
   ByVal argument As String _
) Implements _
   IPostBackEventHandler.RaisePostBackEvent
[C#]
void IPostBackEventHandler.RaisePostBackEvent(
   string argument
);

Implements

IPostBackEventHandler.RaisePostBackEvent

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LiveTimer Events

The events of the LiveTimer class are listed below. For a complete list of LiveTimer class members, see the LiveTimer Members topic.

Public Instance Events

DataBinding (inherited from Control) | Occurs when the server control binds to a data source.
Disposed (inherited from Control) | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.
Init (inherited from Control) | Occurs when the server control is initialized, which is the first step in the its lifecycle.
Load (inherited from Control) | Occurs when the server control is loaded into the Page object.
PreRender (inherited from Control) | Occurs when the server control is about to render to its containing Page object.
Tick | Occurs periodically based on the LiveTimer.Interval property.
Unload (inherited from Control) | Occurs when the server control is unloaded from memory.

See Also

LiveTimer Class | Dart.PowerWEB.LiveControls Namespace


LiveTimer.Tick Event

Occurs periodically based on the LiveTimer.Interval property.

[Visual Basic]
Public Event Tick As EventHandler
[C#]
public event EventHandler Tick;

Remarks

The Tick event fires when the interval since the last Tick event has elapsed.

Example

[Visual Basic, C#] The following example demonstrates using a LiveTimer to periodically update a LiveControl.

[Visual Basic]
'In this example, A LiveTimer periodically updates the color of a LiveLabel
'It also demonstrates using the Tag property to persist information over callbacks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (Not Me.IsPostBack) Then
        'Set default values for the label
        LiveLabel1.BorderWidth = New Unit(4)
        LiveLabel1.BorderColor = Color.Red
        LiveLabel1.ForeColor = Color.Red

        'Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0
        LiveLabel1.Text = "This Message will change color every few seconds"

        'Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000
        LiveTimer1.Start()
    End If
End Sub

Private Sub LiveTimer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LiveTimer1.Tick
    Dim color As Color = color.Red

    'Add 1 to the color index
    Dim index As Integer = Convert.ToInt16(LiveLabel1.Tag) + 1
    LiveLabel1.Tag = index Mod 6  'mod 6 - cycle 0 to 6
    Select Case (index)
    Case 0
        color = color.Red
        Case 1
        color = color.Orange
        Case 2
        color = color.Yellow
        Case 3
        color = color.Green
        Case 4
        color = color.Blue
        Case 5
        color = color.Purple
    End Select

    'Update the LiveLabel's Color
    LiveLabel1.BorderColor = color
    LiveLabel1.ForeColor = color
End Sub
                    [C#]
//In this example, A LiveTimer periodically updates the color of a LiveLabel
//It also demonstrates using the Tag property to persist information over callbacks

private void Page_Load(object sender, System.EventArgs e)
{
    if (!this.IsPostBack)
    {
        //Set default values for the label
        LiveLabel1.BorderWidth = 4;
        LiveLabel1.BorderColor = Color.Red;
        LiveLabel1.ForeColor = Color.Red;

        //Use the Tag property to keep track of color index
        LiveLabel1.Tag = 0;
        LiveLabel1.Text = "This Message will change colors every few seconds!";

        //Start the Timer.  It will fire a Tick event every 2 seconds
        LiveTimer1.Interval = 2000;
        LiveTimer1.Start();
    }
}

private void LiveTimer1_Tick(object sender, System.EventArgs e)
{
    Color color = Color.Red;

    //Add 1 to the color index
    int index = Convert.ToInt16(LiveLabel1.Tag) + 1;
    LiveLabel1.Tag = index%6;  //mod 6 - cycle 0 to 6
    switch (index)
    {
        case 0:
            color = Color.Red;
            break;
        case 1:
            color = Color.Orange;
            break;
        case 2:
            color = Color.Yellow;
            break;
        case 3:
            color = Color.Green;
            break;
        case 4:
            color = Color.Blue;
            break;
        case 5:
            color = Color.Purple;
            break;
    }

    //Update the LiveLabel's Color
    LiveLabel1.BorderColor = color;
    LiveLabel1.ForeColor = color;
}

See Also

LiveTimer Class | LiveTimer Members | Dart.PowerWEB.LiveControls Namespace


LocationEventArgs Class

Provides location data for any events that occur when a user clicks on a LiveControl.

For a list of all members of this type, see LocationEventArgs Members.

System.Object
EventArgs
LocationEventArgs

[Visual Basic]
Public Class LocationEventArgs
Inherits EventArgs
[C#]
public class LocationEventArgs : EventArgs

Remarks

This class passes the location on the page where a user clicked a LiveControl as x and y coordinates. You can then use event handlers to programmatically respond to the event based on the value of these coordinates.

Note The origin coordinates (0,0) are located at the upper left corner of the WebForm.

Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LocationEventArgs Members | Dart.PowerWEB.LiveControls Namespace


LocationEventArgs Members

Public Instance Constructors

LocationEventArgs Overloaded. Initialize a new instance of the LocationEventArgs class.

Public Instance Properties

X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

LocationEventArgs Class | Dart.PowerWEB.LiveControls Namespace


LocationEventArgs Constructor

Initializes a new instance of LocationEventArgs.

Overload List

Initializes a new instance of LocationEventArgs.

public LocationEventArgs();

Initializes a new instance of LocationEventArgs.

public LocationEventArgs(Unit,Unit);

See Also

LocationEventArgs Class | LocationEventArgs Members | Dart.PowerWEB.LiveControls Namespace


LocationEventArgs Constructor ()

Initializes a new instance of LocationEventArgs.

[Visual Basic]
Overloads Public Sub New()
[C#]
public LocationEventArgs();

Remarks

The default constructor initializes a new instance of LocationEventArgs.

See Also

LocationEventArgs Class | LocationEventArgs Members | Dart.PowerWEB.LiveControls Namespace | LocationEventArgs Constructor Overload List


LocationEventArgs Constructor (Unit, Unit)

Initializes a new instance of LocationEventArgs.

[Visual Basic]
Overloads Public Sub New( _
   ByVal x As Unit, _
   ByVal y As Unit _
)
[C#]
public LocationEventArgs(
   Unit x,
   Unit y
);

Remarks

The constructor initializes a new instance of LocationEventArgs with (X, Y) coordinates.

See Also

LocationEventArgs Class | LocationEventArgs Members | Dart.PowerWEB.LiveControls Namespace | LocationEventArgs Constructor Overload List


LocationEventArgs Properties

The properties of the LocationEventArgs class are listed below. For a complete list of LocationEventArgs class members, see the LocationEventArgs Members topic.

Public Instance Properties

X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked.
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

See Also

LocationEventArgs Class | Dart.PowerWEB.LiveControls Namespace


LocationEventArgs.X Property

Gets or sets the x-coordinate of the WebForm when the mouse is clicked.

[Visual Basic]
Public Property X As Unit
[C#]
public System.Web.UI.WebControls.Unit X {get; set;}

Property Value

A Unit corresponding to the x-coordinate of the mouse click.

Remarks

Use this property with LocationEventArgs.Y to determine the location of the mouse click.

See Also

LocationEventArgs Class | LocationEventArgs Members | Dart.PowerWEB.LiveControls Namespace


LocationEventArgs.Y Property

Gets or sets the y-coordinate of the WebForm when the mouse is clicked.

[Visual Basic]
Public Property Y As Unit
[C#]
public System.Web.UI.WebControls.Unit Y {get; set;}

Property Value

A Unit corresponding to the y-coordinate of the mouse click.

Remarks

Use this property with LocationEventArgs.X to determine the location of the mouse click.

See Also

LocationEventArgs Class | LocationEventArgs Members | Dart.PowerWEB.LiveControls Namespace


LocationEventHandler Delegate

The delegate for events that require location information.

[Visual Basic]
Public Delegate Sub LocationEventHandler( _
   ByVal sender As Object, _
   ByVal e As LocationEventArgs _
)
[C#]
public delegate void LocationEventHandler(
   object sender,
   LocationEventArgs e
);

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

Dart.PowerWEB.LiveControls Namespace


NonEditModeBehavior Enumeration

Enumerates values which describe the behavior of LiveControls.LiveCheckBoxColumn when in non-edit mode.

[Visual Basic]
Public Enum NonEditModeBehavior
[C#]
public enum NonEditModeBehavior

Remarks

This enumeration is used by the LiveCheckBoxColumn.NonEditModeBehavior property.

Members

Member Name | Description
Text | The text representation of the cell contents (not a check box).
EnabledCheckBox | The check boxes are enabled.
DisabledCheckBox | The check boxes are disabled.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

Dart.PowerWEB.LiveControls Namespace


ResponseEventArgs Class

Provides data for a LiveControls.LiveMessageBox of type DialogType.Prompt or DialogType.Confirm.

For a list of all members of this type, see ResponseEventArgs Members.

System.Object
EventArgs
ResponseEventArgs

[Visual Basic]
Public Class ResponseEventArgs
Inherits EventArgs
[C#]
public class ResponseEventArgs : EventArgs

Remarks

This class passes the response to a LiveControls.LiveMessageBox. You can then use event handlers to programmatically respond to the event based on the value of these arguments.

Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

ResponseEventArgs Members | Dart.PowerWEB.LiveControls Namespace


ResponseEventArgs Members

Public Instance Constructors

ResponseEventArgs Overloaded. Initialize a new instance of the ResponseEventArgs class.

Public Instance Properties

Confirmed | Gets or sets the confirmed state of a LiveControls.LiveMessageBox.
DialogType | Gets or sets the confirmed state of a LiveControls.LiveMessageBox.
Text | Gets or sets the response message of a LiveControls.LiveMessageBox.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

ResponseEventArgs Class | Dart.PowerWEB.LiveControls Namespace


ResponseEventArgs Constructor

Initializes a new instance of ResponseEventArgs.

Overload List

Initializes a new instance of ResponseEventArgs.

public ResponseEventArgs();

Initializes a new instance of ResponseEventArgs.

public ResponseEventArgs(string,string);

See Also

ResponseEventArgs Class | ResponseEventArgs Members | Dart.PowerWEB.LiveControls Namespace


ResponseEventArgs Constructor ()

Initializes a new instance of ResponseEventArgs.

[Visual Basic]
Overloads Public Sub New()
[C#]
public ResponseEventArgs();

Remarks

The default constructor initializes a new instance of ResponseEventArgs.

See Also

ResponseEventArgs Class | ResponseEventArgs Members | Dart.PowerWEB.LiveControls Namespace | ResponseEventArgs Constructor Overload List


ResponseEventArgs Constructor (String, String)

Initializes a new instance of ResponseEventArgs.

[Visual Basic]
Overloads Public Sub New( _
   ByVal response As String, _
   ByVal responseType As String _
)
[C#]
public ResponseEventArgs(
   string response,
   string responseType
);

Remarks

The constructor initializes a new instance of ResponseEventArgs with a response string.

See Also

ResponseEventArgs Class | ResponseEventArgs Members | Dart.PowerWEB.LiveControls Namespace | ResponseEventArgs Constructor Overload List


ResponseEventArgs Properties

The properties of the ResponseEventArgs class are listed below. For a complete list of ResponseEventArgs class members, see the ResponseEventArgs Members topic.

Public Instance Properties

Confirmed | Gets or sets the confirmed state of a LiveControls.LiveMessageBox.
DialogType | Gets or sets the confirmed state of a LiveControls.LiveMessageBox.
Text | Gets or sets the response message of a LiveControls.LiveMessageBox.

See Also

ResponseEventArgs Class | Dart.PowerWEB.LiveControls Namespace


ResponseEventArgs.Confirmed Property

Gets or sets the confirmed state of a LiveControls.LiveMessageBox.

[Visual Basic]
Public Property Confirmed As Boolean
[C#]
public bool Confirmed {get; set;}

Property Value

true for a confirmed response, otherwise false.

Remarks

Use this property to determine if a response is confirmed.

See Also

ResponseEventArgs Class | ResponseEventArgs Members | Dart.PowerWEB.LiveControls Namespace


ResponseEventArgs.DialogType Property

Gets or sets the confirmed state of a LiveControls.LiveMessageBox.

[Visual Basic]
Public Property DialogType As DialogType
[C#]
public DialogType DialogType {get; set;}

Property Value

true for a confirmed response, otherwise false.

Remarks

Use this property to determine if a response is confirmed.

See Also

ResponseEventArgs Class | ResponseEventArgs Members | Dart.PowerWEB.LiveControls Namespace


ResponseEventArgs.Text Property

Gets or sets the response message of a LiveControls.LiveMessageBox.

[Visual Basic]
Public Property Text As String
[C#]
public string Text {get; set;}

Property Value

The message after a LiveControls.LiveMessageBox is responded to.

Remarks

Use this property to determine the response message of a LiveControls.LiveMessageBox.

See Also

ResponseEventArgs Class | ResponseEventArgs Members | Dart.PowerWEB.LiveControls Namespace


ResponseEventHandler Delegate

The delegate for the Response event.

[Visual Basic]
Public Delegate Sub ResponseEventHandler( _
   ByVal sender As Object, _
   ByVal e As ResponseEventArgs _
)
[C#]
public delegate void ResponseEventHandler(
   object sender,
   ResponseEventArgs e
);

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

Dart.PowerWEB.LiveControls Namespace


Samples

Sample applications are provided to demonstrate usage of the PowerWEB LiveControls for ASP.NET in Visual Studio .NET. The Visual Studio .NET samples are available in both VB.NET and C#. The samples are structured around a single Web application per environment that demonstrates usage from links off a central page. For example, the Visual Studio .NET C# samples are available from the PowerWEB LiveControls C# Samples project.

Please note the documentation also includes a number of tutorials and code snippets for certain control members.

IMPORTANT: These samples are setup for the .NET Framework 1.1, rather than 1.0. This means that the samples have the following attribute set: ValidateRequest="false" If you wish to use these samples with the 1.0 version of the Framework, you will need to remove that attribute from the ASPX file. Below is an example ASPX header that will contain that attribute:

<%@ Page language="c#" Codebehind="LatestNews.aspx.cs" AutoEventWireup="false" Inherits="PowerWEB_LiveControls_CSharp.LatestNews" ValidateRequest="false"%>

The following table shows the samples for this release and their default install locations.

Sample | Language | Location
LiveAuction | VB.NET Web Application (ASP.NET) C# Web Application (ASP.NET) | C:\Program Files\PowerWEB\LiveControls for ASP.NET\Samples\C# C:\Program Files\PowerWEB\LiveControls for ASP.NET\Samples\VB.NET
LiveProgress | VB.NET Web Application (ASP.NET) C# Web Application (ASP.NET) | C:\Program Files\PowerWEB\LiveControls for ASP.NET\Samples\C# C:\Program Files\PowerWEB\LiveControls for ASP.NET\Samples\VB.NET
LiveComparison | VB.NET Web Application (ASP.NET) C# Web Application (ASP.NET) | C:\Program Files\PowerWEB\LiveControls for ASP.NET\Samples\C# C:\Program Files\PowerWEB\LiveControls for ASP.NET\Samples\VB.NET
LiveShoppingCart | VB.NET Web Application (ASP.NET) C# Web Application (ASP.NET) | C:\Program Files\PowerWEB\LiveControls for ASP.NET\Samples\C# C:\Program Files\PowerWEB\LiveControls for ASP.NET\Samples\VB.NET
LiveSlideShow | VB.NET Web Application (ASP.NET) C# Web Application (ASP.NET) | C:\Program Files\PowerWEB\LiveControls for ASP.NET\Samples\C# C:\Program Files\PowerWEB\LiveControls for ASP.NET\Samples\VB.NET

Related Sections

Getting Started
Provides an overview of PowerWEB LiveControls for ASP.NET and discusses such topics as distribution, licensing, and support.
Using PowerWEB in VS.NET
Provides step-by-step instructions for creating a project using VS.NET, integrating PowerWEB LiveControls for ASP.NET, and creating a simple application.
Using PowerWEB with Notepad
Provides step-by-step instructions for creating a simple project using notepad only.
Optimizing Performance
Discusses techniques for optimizing performance of the the PowerWEB LiveControls for ASP.NET, including reducing ViewState and render-size.
Advanced Topics
Discusses advanced implementations of the PowerWEB LiveControls for ASP.NET.
Reference
Provides a language/syntax and client-side API reference for PowerWEB LiveControls for ASP.NET.
Samples
Describes the samples that are installed with PowerWEB LiveControls for ASP.NET.

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


LiveAuction Sample

Description: An example of how LiveControls can be used to create an on-line auction that updates current price and bidder by polling the server every few seconds.

Virtual Directory: PowerWEB_LiveControls_CSharp, PowerWEB_LiveControls_VB

Requirements

Assemblies: Dart.PowerWEB.LiveControls

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


LiveComparison Sample

Description: An example demonstrating the user experience difference when using standard ASP.NET controls and LiveControls..

Virtual Directory: PowerWEB_LiveControls_CSharp, PowerWEB_LiveControls_VB

Requirements

Assemblies: Dart.PowerWEB.LiveControls

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


LiveProgress Sample

Description: An example demonstrating how to create a progress bar that is driven by server-side data.

Virtual Directory: PowerWEB_LiveControls_CSharp, PowerWEB_LiveControls_VB

Requirements

Assemblies: Dart.PowerWEB.LiveControls

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


LiveShoppingCart Sample

Description: An example demonstrating a shopping system that gets the latest price information from the server without refreshing the screen.

Virtual Directory: PowerWEB_LiveControls_CSharp, PowerWEB_LiveControls_VB

Requirements

Assemblies: Dart.PowerWEB.LiveControls

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


LiveSlideShow Sample

Description: An example of how to create a slide show application that is server-driven, but doesn't require a page refresh to get that data..

Virtual Directory: PowerWEB_LiveControls_CSharp, PowerWEB_LiveControls_VB

Requirements

Assemblies: Dart.PowerWEB.LiveControls

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


Dart.PowerWEB.LiveControls.Design

PowerWEB LiveControls for ASP.NET

Dart.PowerWEB.LiveControls.Design Namespace

Classes

Class | Description
About | Documentation stub
AboutBoxDesigner |
AboutForm | Summary description for AboutBoxForm.
LiveCallbackDesigner |
LiveDataGridDesigner | Summary description for LiveDataGridDesigner.
LiveMessageBoxDesigner |
LivePlaceHolderDesigner |
LiveSoundDesigner |
LiveTimerDesigner |


About Class

Documentation stub

For a list of all members of this type, see About Members.

System.Object
ComponentEditor
WindowsFormsComponentEditor
About

[Visual Basic]
Public Class About
Inherits WindowsFormsComponentEditor
[C#]
public class About : WindowsFormsComponentEditor

Requirements

Namespace: Dart.PowerWEB.LiveControls.Design Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

About Members | Dart.PowerWEB.LiveControls.Design Namespace


EditComponent Method

PowerWEB LiveControls for ASP.NET

About.EditComponent Method

Documentation stub

Overload List

Documentation stub

public override bool EditComponent(ITypeDescriptorContext,object,IWin32Window);

Inherited from WindowsFormsComponentEditor.

public override bool EditComponent(ITypeDescriptorContext,object);

Inherited from WindowsFormsComponentEditor.

public bool EditComponent(object,IWin32Window);

Inherited from ComponentEditor.

public bool EditComponent(object);

See Also

About Class | About Members | Dart.PowerWEB.LiveControls.Design Namespace


About.EditComponent Method (ITypeDescriptorContext, Object, IWin32Window)

Documentation stub

[Visual Basic]
Overrides Overloads Public Function EditComponent( _
   ByVal context As ITypeDescriptorContext, _
   ByVal component As Object, _
   ByVal owner As IWin32Window _
) As Boolean
[C#]
public override bool EditComponent(
   ITypeDescriptorContext context,
   object component,
   IWin32Window owner
);

See Also

About Class | About Members | Dart.PowerWEB.LiveControls.Design Namespace | About.EditComponent Overload List


AboutBoxDesigner Class

For a list of all members of this type, see AboutBoxDesigner Members.

System.Object
ComponentDesigner
HtmlControlDesigner
ControlDesigner
AboutBoxDesigner

[Visual Basic]
Public Class AboutBoxDesigner
Inherits ControlDesigner
[C#]
public class AboutBoxDesigner : ControlDesigner

Requirements

Namespace: Dart.PowerWEB.LiveControls.Design Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

AboutBoxDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


AboutBoxDesigner.Verbs Property

[Visual Basic]
Overrides Public ReadOnly Property Verbs As DesignerVerbCollection Implements _
   IDesigner.Verbs
[C#]
public override System.ComponentModel.Design.DesignerVerbCollection Verbs {get;}

Implements

IDesigner.Verbs

See Also

AboutBoxDesigner Class | AboutBoxDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


AboutBoxDesigner Constructor

Initializes a new instance of the AboutBoxDesigner class.

[Visual Basic]
Public Sub New()
[C#]
public AboutBoxDesigner();

See Also

AboutBoxDesigner Class | AboutBoxDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


AboutBoxDesigner Members

Public Instance Constructors

AboutBoxDesigner Constructor Initializes a new instance of the AboutBoxDesigner class.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml (inherited from ControlDesigner) | Gets the HTML that is used to represent the control at design time.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ControlDesigner) | Initializes the designer and loads the specified component.
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

AboutBoxDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


AboutBoxDesigner Properties

The properties of the AboutBoxDesigner class are listed below. For a complete list of AboutBoxDesigner class members, see the AboutBoxDesigner Members topic.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

See Also

AboutBoxDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


About Constructor

Initializes a new instance of the About class.

[Visual Basic]
Public Sub New()
[C#]
public About();

See Also

About Class | About Members | Dart.PowerWEB.LiveControls.Design Namespace


AboutForm Class

Summary description for AboutBoxForm.

For a list of all members of this type, see AboutForm Members.

System.Object
MarshalByRefObject
Component
Control
ScrollableControl
ContainerControl
Form
AboutForm

[Visual Basic]
Public Class AboutForm
Inherits Form
[C#]
public class AboutForm : Form

Requirements

Namespace: Dart.PowerWEB.LiveControls.Design Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

AboutForm Members | Dart.PowerWEB.LiveControls.Design Namespace


AboutForm Constructor

Documentation stub

[Visual Basic]
Public Sub New()
[C#]
public AboutForm();

See Also

AboutForm Class | AboutForm Members | Dart.PowerWEB.LiveControls.Design Namespace


AboutForm Members

Public Instance Constructors

AboutForm Constructor Documentation stub

Public Instance Properties

AcceptButton (inherited from Form) | Gets or sets the button on the form that is clicked when the user presses the ENTER key.
AccessibilityObject (inherited from Control) | Gets the AccessibleObject assigned to the control.
AccessibleDefaultActionDescription (inherited from Control) | Gets or sets the default action description of the control for use by accessibility client applications.
AccessibleDescription (inherited from Control) | Gets or sets the description of the control used by accessibility client applications.
AccessibleName (inherited from Control) | Gets or sets the name of the control used by accessibility client applications.
AccessibleRole (inherited from Control) | Gets or sets the accessible role of the control
ActiveControl (inherited from ContainerControl) | Gets or sets the active control on the container control.
ActiveMdiChild (inherited from Form) | Gets the currently active multiple document interface (MDI) child window.
AllowDrop (inherited from Control) | Gets or sets a value indicating whether the control can accept data that the user drags onto it.
AllowTransparency (inherited from Form) |
Anchor (inherited from Control) | Gets or sets which edges of the control are anchored to the edges of its container.
AutoScale (inherited from Form) | Gets or sets a value indicating whether the form adjusts its size to fit the height of the font used on the form and scales its controls.
AutoScaleBaseSize (inherited from Form) | Gets or sets the base size used for autoscaling of the form.
AutoScroll (inherited from Form) | Gets or sets a value indicating whether the form enables autoscrolling.
AutoScrollMargin (inherited from ScrollableControl) | Gets or sets the size of the auto-scroll margin.
AutoScrollMinSize (inherited from ScrollableControl) | Gets or sets the minimum size of the auto-scroll.
AutoScrollPosition (inherited from ScrollableControl) | Gets or sets the location of the auto-scroll position.
BackColor (inherited from Form) |
BackgroundImage (inherited from Control) | Gets or sets the background image displayed in the control.
BindingContext (inherited from ContainerControl) |
Bottom (inherited from Control) | Gets the distance between the bottom edge of the control and the top edge of its container's client area.
Bounds (inherited from Control) | Gets or sets the size and location of the control.
CancelButton (inherited from Form) | Gets or sets the button control that is clicked when the user presses the ESC key.
CanFocus (inherited from Control) | Gets a value indicating whether the control can receive focus.
CanSelect (inherited from Control) | Gets a value indicating whether the control can be selected.
Capture (inherited from Control) | Gets or sets a value indicating whether the control has captured the mouse.
CausesValidation (inherited from Control) | Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.
ClientRectangle (inherited from Control) | Gets the rectangle that represents the client area of the control.
ClientSize (inherited from Form) | Gets or sets the size of the client area of the form.
CompanyName (inherited from Control) | Gets the name of the company or creator of the application containing the control.
Container (inherited from Component) | Gets the IContainer that contains the Component.
ContainsFocus (inherited from Control) | Gets a value indicating whether the control, or one of its child controls, currently has the input focus.
ContextMenu (inherited from Control) | Gets or sets the shortcut menu associated with the control.
ControlBox (inherited from Form) | Gets or sets a value indicating whether a control box is displayed in the caption bar of the form.
Controls (inherited from Control) | Gets the collection of controls contained within the control.
Created (inherited from Control) | Gets a value indicating whether the control has been created.
Cursor (inherited from Control) | Gets or sets the cursor that is displayed when the mouse pointer is over the control.
DataBindings (inherited from Control) | Gets the data bindings for the control.
DesktopBounds (inherited from Form) | Gets or sets the size and location of the form on the Windows desktop.
DesktopLocation (inherited from Form) | Gets or sets the location of the form on the Windows desktop.
DialogResult (inherited from Form) | Gets or sets the dialog result for the form.
DisplayRectangle (inherited from ScrollableControl) |
Disposing (inherited from Control) | Gets a value indicating whether the control is in the process of being disposed of.
Dock (inherited from Control) | Gets or sets which edge of the parent container a control is docked to.
DockPadding (inherited from ScrollableControl) | Gets the dock padding settings for all edges of the control.
Enabled (inherited from Control) | Gets or sets a value indicating whether the control can respond to user interaction.
Focused (inherited from Control) | Gets a value indicating whether the control has input focus.
Font (inherited from Control) | Gets or sets the font of the text displayed by the control.
ForeColor (inherited from Control) | Gets or sets the foreground color of the control.
FormBorderStyle (inherited from Form) | Gets or sets the border style of the form.
Handle (inherited from Control) | Gets the window handle that the control is bound to.
HasChildren (inherited from Control) | Gets a value indicating whether the control contains one or more child controls.
Height (inherited from Control) | Gets or sets the height of the control.
HelpButton (inherited from Form) | Gets or sets a value indicating whether a Help button should be displayed in the caption box of the form.
Icon (inherited from Form) | Gets or sets the icon for the form.
ImeMode (inherited from Control) | Gets or sets the Input Method Editor (IME) mode of the control.
InvokeRequired (inherited from Control) | Gets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on.
IsAccessible (inherited from Control) | Gets or sets a value indicating whether the control is visible to accessibility applications.
IsDisposed (inherited from Control) | Gets a value indicating whether the control has been disposed of.
IsHandleCreated (inherited from Control) | Gets a value indicating whether the control has a handle associated with it.
IsMdiChild (inherited from Form) | Gets a value indicating whether the form is a multiple document interface (MDI) child form.
IsMdiContainer (inherited from Form) | Gets or sets a value indicating whether the form is a container for multiple document interface (MDI) child forms.
IsRestrictedWindow (inherited from Form) |
KeyPreview (inherited from Form) | Gets or sets a value indicating whether the form will receive key events before the event is passed to the control that has focus.
Left (inherited from Control) | Gets or sets the x-coordinate of a control's left edge in pixels.
Location (inherited from Control) | Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.
MaximizeBox (inherited from Form) | Gets or sets a value indicating whether the maximize button is displayed in the caption bar of the form.
MaximumSize (inherited from Form) | Gets the maximum size the form can be resized to.
MdiChildren (inherited from Form) | Gets an array of forms that represent the multiple document interface (MDI) child forms that are parented to this form.
MdiParent (inherited from Form) | Gets or sets the current multiple document interface (MDI) parent form of this form.
Menu (inherited from Form) | Gets or sets the MainMenu that is displayed in the form.
MergedMenu (inherited from Form) | Gets the merged menu for the form.
MinimizeBox (inherited from Form) | Gets or sets a value indicating whether the minimize button is displayed in the caption bar of the form.
MinimumSize (inherited from Form) | Gets or sets the minimum size the form can be resized to.
Modal (inherited from Form) | Gets a value indicating whether this form is displayed modally.
Name (inherited from Control) | Gets or sets the name of the control.
Opacity (inherited from Form) | Gets or sets the opacity level of the form.
OwnedForms (inherited from Form) | Gets an array of Form objects that represent all forms that are owned by this form.
Owner (inherited from Form) | Gets or sets the form that owns this form.
Parent (inherited from Control) | Gets or sets the parent container of the control.
ParentForm (inherited from ContainerControl) | Gets the form that the container control is assigned to.
ProductName (inherited from Control) | Gets the product name of the assembly containing the control.
ProductVersion (inherited from Control) | Gets the version of the assembly containing the control.
RecreatingHandle (inherited from Control) | Gets a value indicating whether the control is currently re-creating its handle.
Region (inherited from Control) | Gets or sets the window region associated with the control.
Right (inherited from Control) | Gets the distance between the right edge of the control and the left edge of its container.
RightToLeft (inherited from Control) | Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.
ShowInTaskbar (inherited from Form) | Gets or sets a value indicating whether the form is displayed in the Windows taskbar.
Site (inherited from Control) | Gets or sets the site of the control.
Size (inherited from Form) | Gets or sets the size of the form.
SizeGripStyle (inherited from Form) | Gets or sets the style of the size grip to display in the lower-right corner of the form.
StartPosition (inherited from Form) | Gets or sets the starting position of the form at run time.
TabIndex (inherited from Form) |
TabStop (inherited from Control) | Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.
Tag (inherited from Control) | Gets or sets the object that contains data about the control.
Text (inherited from Control) | Gets or sets the text associated with this control.
Top (inherited from Control) | Gets or sets the y-coordinate of the control's top edge in pixels.
TopLevel (inherited from Form) | Gets or sets a value indicating whether to display the form as a top-level window.
TopLevelControl (inherited from Control) | Gets the parent control that is not parented by another Windows Forms control. Typically, this is the outermost Form that the control is contained in.
TopMost (inherited from Form) | Gets or sets a value indicating whether the form should be displayed as the top-most form of your application.
TransparencyKey (inherited from Form) | Gets or sets the color that will represent transparent areas of the form.
Visible (inherited from Control) | Gets or sets a value indicating whether the control is displayed.
Width (inherited from Control) | Gets or sets the width of the control.
WindowState (inherited from Form) | Gets or sets the form's window state.
WindowTarget (inherited from Control) |

Public Instance Methods

Activate (inherited from Form) | Activates the form and gives it focus.
AddOwnedForm (inherited from Form) | Adds an owned form to this form.
BeginInvoke (inherited from Control) | Executes the specified delegate asynchronously with the specified arguments, on the thread that the control's underlying handle was created on.
BeginInvoke (inherited from Control) | Executes the specified delegate asynchronously on the thread that the control's underlying handle was created on.
BringToFront (inherited from Control) | Brings the control to the front of the z-order.
Close (inherited from Form) | Closes the form.
Contains (inherited from Control) | Retrieves a value indicating whether the specified control is a child of the control.
CreateControl (inherited from Control) | Forces the creation of the control, including the creation of the handle and any child controls.
CreateGraphics (inherited from Control) | Creates the Graphics object for the control.
CreateObjRef (inherited from MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Dispose (inherited from Component) | Releases all resources used by the Component.
DoDragDrop (inherited from Control) | Begins a drag-and-drop operation.
EndInvoke (inherited from Control) | Retrieves the return value of the asynchronous operation represented by the IAsyncResult object passed.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
FindForm (inherited from Control) | Retrieves the form that the control is on.
Focus (inherited from Control) | Sets input focus to the control.
GetChildAtPoint (inherited from Control) | Retrieves the child control that is located at the specified coordinates.
GetContainerControl (inherited from Control) | Returns the next ContainerControl up the control's chain of parent controls.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetLifetimeService (inherited from MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
GetNextControl (inherited from Control) | Retrieves the next control forward or back in the tab order of child controls.
GetType (inherited from Object) | Gets the Type of the current instance.
Hide (inherited from Control) | Conceals the control from the user.
InitializeLifetimeService (inherited from MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Invalidate (inherited from Control) | Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.
Invalidate (inherited from Control) | Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.
Invalidate (inherited from Control) | Invalidates a specific region of the control and causes a paint message to be sent to the control.
Invalidate (inherited from Control) | Invalidates a specific region of the control and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.
Invalidate (inherited from Control) | Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.
Invalidate (inherited from Control) | Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.
Invoke (inherited from Control) | Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments.
Invoke (inherited from Control) | Executes the specified delegate on the thread that owns the control's underlying window handle.
LayoutMdi (inherited from Form) | Arranges the multiple document interface (MDI) child forms within the MDI parent form.
PerformLayout (inherited from Control) | Forces the control to apply layout logic to all its child controls.
PerformLayout (inherited from Control) | Forces the control to apply layout logic to all its child controls.
PointToClient (inherited from Control) | Computes the location of the specified screen point into client coordinates.
PointToScreen (inherited from Control) | Computes the location of the specified client point into screen coordinates.
PreProcessMessage (inherited from Control) | Preprocesses input messages within the message loop before they are dispatched.
RectangleToClient (inherited from Control) | Computes the size and location of the specified screen rectangle in client coordinates.
RectangleToScreen (inherited from Control) | Computes the size and location of the specified client rectangle in screen coordinates.
Refresh (inherited from Control) | Forces the control to invalidate its client area and immediately redraw itself and any child controls.
RemoveOwnedForm (inherited from Form) | Removes an owned form from this form.
ResetBackColor (inherited from Control) | Resets the BackColor property to its default value.
ResetBindings (inherited from Control) | Resets the DataBindings property to its default value.
ResetCursor (inherited from Control) | Resets the Cursor property to its default value.
ResetFont (inherited from Control) | Resets the Fontproperty to its default value.
ResetForeColor (inherited from Control) | Resets the ForeColor property to its default value.
ResetImeMode (inherited from Control) | Resets the ImeMode property to its default value.
ResetRightToLeft (inherited from Control) | Resets the RightToLeft property to its default value.
ResetText (inherited from Control) | Resets the Text property to its default value.
ResumeLayout (inherited from Control) | Resumes normal layout logic.
ResumeLayout (inherited from Control) | Resumes normal layout logic. Optionally forces an immediate layout of pending layout requests.
Scale (inherited from Control) | Scales the control and any child controls to the specified ratio.
Scale (inherited from Control) | Scales the control and any child controls by the specified horizontal and vertical ratios.
ScrollControlIntoView (inherited from ScrollableControl) |
Select (inherited from Control) | Activates the control.
SelectNextControl (inherited from Control) | Activates the next control.
SendToBack (inherited from Control) | Sends the control to the back of the z-order.
SetAutoScrollMargin (inherited from ScrollableControl) | Sets the size of the auto-scroll margins.
SetBounds (inherited from Control) | Sets the bounds of the control to the specified location and size.
SetBounds (inherited from Control) | Sets the specified bounds of the control to the specified location and size.
SetDesktopBounds (inherited from Form) | Sets the bounds of the form in desktop coordinates.
SetDesktopLocation (inherited from Form) | Sets the location of the form in desktop coordinates.
Show (inherited from Control) | Displays the control to the user.
ShowDialog (inherited from Form) | Shows the form as a modal dialog box with no owner window.
ShowDialog (inherited from Form) | Shows the form as a modal dialog with the specified owner.
SuspendLayout (inherited from Control) | Temporarily suspends the layout logic for the control.
ToString (inherited from Form) |
Update (inherited from Control) | Causes the control to redraw the invalidated regions with its client area.
Validate (inherited from ContainerControl) | Validates the last invalidated control and its ancestors up through, but not including, the current control.

Public Instance Events

Activated (inherited from Form) | Occurs when the form is activated in code or by the user.
BackColorChanged (inherited from Control) | Occurs when the value of the BackColor property changes.
BackgroundImageChanged (inherited from Control) | Occurs when the value of the BackgroundImage property changes.
BindingContextChanged (inherited from Control) | Occurs when the value of the BindingContext property changes.
CausesValidationChanged (inherited from Control) | Occurs when the value of the CausesValidation property changes.
ChangeUICues (inherited from Control) | Occurs when the focus or keyboard user interface (UI) cues change.
Click (inherited from Control) | Occurs when the control is clicked.
Closed (inherited from Form) | Occurs when the form is closed.
Closing (inherited from Form) | Occurs when the form is closing.
ContextMenuChanged (inherited from Control) | Occurs when the value of the ContextMenu property changes.
ControlAdded (inherited from Control) | Occurs when a new control is added to the ControlCollection .
ControlRemoved (inherited from Control) | Occurs when a control is removed from the ControlCollection .
CursorChanged (inherited from Control) | Occurs when the value of the Cursor property changes.
Deactivate (inherited from Form) | Occurs when the form loses focus and is not the active form.
Disposed (inherited from Component) | Adds an event handler to listen to the Disposed event on the component.
DockChanged (inherited from Control) | Occurs when the value of the Dock property changes.
DoubleClick (inherited from Control) | Occurs when the control is double-clicked.
DragDrop (inherited from Control) | Occurs when a drag-and-drop operation is completed.
DragEnter (inherited from Control) | Occurs when an object is dragged into the control's bounds.
DragLeave (inherited from Control) | Occurs when an object is dragged out of the control's bounds.
DragOver (inherited from Control) | Occurs when an object is dragged over the control's bounds.
EnabledChanged (inherited from Control) | Occurs when the Enabled property value has changed.
Enter (inherited from Control) | Occurs when the control is entered.
FontChanged (inherited from Control) | Occurs when the Font property value changes.
ForeColorChanged (inherited from Control) | Occurs when the ForeColor property value changes.
GiveFeedback (inherited from Control) | Occurs during a drag operation.
GotFocus (inherited from Control) | Occurs when the control receives focus.
HandleCreated (inherited from Control) | Occurs when a handle is created for the control.
HandleDestroyed (inherited from Control) | Occurs when the control's handle is in the process of being destroyed.
HelpRequested (inherited from Control) | Occurs when the user requests help for a control.
ImeModeChanged (inherited from Control) | Occurs when the ImeMode property has changed.
InputLanguageChanged (inherited from Form) | Occurs after the input language of the form has changed.
InputLanguageChanging (inherited from Form) | Occurs when the user attempts to change the input language for the form.
Invalidated (inherited from Control) | Occurs when a control's display requires redrawing.
KeyDown (inherited from Control) | Occurs when a key is pressed while the control has focus.
KeyPress (inherited from Control) | Occurs when a key is pressed while the control has focus.
KeyUp (inherited from Control) | Occurs when a key is released while the control has focus.
Layout (inherited from Control) | Occurs when a control should reposition its child controls.
Leave (inherited from Control) | Occurs when the input focus leaves the control.
Load (inherited from Form) | Occurs before a form is displayed for the first time.
LocationChanged (inherited from Control) | Occurs when the Location property value has changed.
LostFocus (inherited from Control) | Occurs when the control loses focus.
MaximizedBoundsChanged (inherited from Form) | Occurs when the value of the MaximizedBounds property has changed.
MaximumSizeChanged (inherited from Form) | Occurs when the value of the MaximumSize property has changed.
MdiChildActivate (inherited from Form) | Occurs when a multiple document interface (MDI) child form is activated or closed within an MDI application.
MenuComplete (inherited from Form) | Occurs when the menu of a form loses focus.
MenuStart (inherited from Form) | Occurs when the menu of a form receives focus.
MinimumSizeChanged (inherited from Form) | Occurs when the value of the MinimumSize property has changed.
MouseDown (inherited from Control) | Occurs when the mouse pointer is over the control and a mouse button is pressed.
MouseEnter (inherited from Control) | Occurs when the mouse pointer enters the control.
MouseHover (inherited from Control) | Occurs when the mouse pointer hovers over the control.
MouseLeave (inherited from Control) | Occurs when the mouse pointer leaves the control.
MouseMove (inherited from Control) | Occurs when the mouse pointer is moved over the control.
MouseUp (inherited from Control) | Occurs when the mouse pointer is over the control and a mouse button is released.
MouseWheel (inherited from Control) | Occurs when the mouse wheel moves while the control has focus.
Move (inherited from Control) | Occurs when the control is moved.
Paint (inherited from Control) | Occurs when the control is redrawn.
ParentChanged (inherited from Control) | Occurs when the Parent property value changes.
QueryAccessibilityHelp (inherited from Control) | Occurs when AccessibleObject is providing help to accessibility applications.
QueryContinueDrag (inherited from Control) | Occurs during a drag-and-drop operation and allows the drag source to determine whether the drag-and-drop operation should be canceled.
Resize (inherited from Control) | Occurs when the control is resized.
RightToLeftChanged (inherited from Control) | Occurs when the RightToLeft property value changes.
SizeChanged (inherited from Control) | Occurs when the Size property value changes.
StyleChanged (inherited from Control) | Occurs when the control style changes.
SystemColorsChanged (inherited from Control) | Occurs when the system colors change.
TabIndexChanged (inherited from Control) | Occurs when the TabIndex property value changes.
TabStopChanged (inherited from Control) | Occurs when the TabStop property value changes.
TextChanged (inherited from Control) | Occurs when the Text property value changes.
Validated (inherited from Control) | Occurs when the control is finished validating.
Validating (inherited from Control) | Occurs when the control is validating.
VisibleChanged (inherited from Control) | Occurs when the Visible property value changes.

Explicit Interface Implementations

IContainerControl.ActivateControl (inherited from ContainerControl)

See Also

AboutForm Class | Dart.PowerWEB.LiveControls.Design Namespace


About Members

Public Instance Constructors

About Constructor Initializes a new instance of the About class.

Public Instance Methods

EditComponent | Overloaded. Documentation stub
EditComponent (inherited from WindowsFormsComponentEditor) | Creates an editor window that allows the user to edit the specified component, using the specified context information.
EditComponent (inherited from WindowsFormsComponentEditor) | Creates an editor window that allows the user to edit the specified component, using the specified window which owns the component.
EditComponent (inherited from ComponentEditor) | Edits the component and returns a value indicating whether the component was modified.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

About Class | Dart.PowerWEB.LiveControls.Design Namespace


About Methods

The methods of the About class are listed below. For a complete list of About class members, see the About Members topic.

Public Instance Methods

EditComponent | Overloaded. Documentation stub
EditComponent (inherited from WindowsFormsComponentEditor) | Creates an editor window that allows the user to edit the specified component, using the specified context information.
EditComponent (inherited from WindowsFormsComponentEditor) | Creates an editor window that allows the user to edit the specified component, using the specified window which owns the component.
EditComponent (inherited from ComponentEditor) | Edits the component and returns a value indicating whether the component was modified.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

About Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveCallbackDesigner Class

For a list of all members of this type, see LiveCallbackDesigner Members.

System.Object
ComponentDesigner
HtmlControlDesigner
ControlDesigner
LiveCallbackDesigner

[Visual Basic]
Public Class LiveCallbackDesigner
Inherits ControlDesigner
[C#]
public class LiveCallbackDesigner : ControlDesigner

Requirements

Namespace: Dart.PowerWEB.LiveControls.Design Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveCallbackDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveCallbackDesigner.GetDesignTimeHtml Method

[Visual Basic]
Overrides Public Function GetDesignTimeHtml() As String
[C#]
public override string GetDesignTimeHtml();

Return Value

See Also

LiveCallbackDesigner Class | LiveCallbackDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveCallbackDesigner.Verbs Property

[Visual Basic]
Overrides Public ReadOnly Property Verbs As DesignerVerbCollection Implements _
   IDesigner.Verbs
[C#]
public override System.ComponentModel.Design.DesignerVerbCollection Verbs {get;}

Implements

IDesigner.Verbs

See Also

LiveCallbackDesigner Class | LiveCallbackDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveCallbackDesigner Constructor

Initializes a new instance of the LiveCallbackDesigner class.

[Visual Basic]
Public Sub New()
[C#]
public LiveCallbackDesigner();

See Also

LiveCallbackDesigner Class | LiveCallbackDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveCallbackDesigner Members

Public Instance Constructors

LiveCallbackDesigner Constructor Initializes a new instance of the LiveCallbackDesigner class.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ControlDesigner) | Initializes the designer and loads the specified component.
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

LiveCallbackDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveCallbackDesigner Methods

The methods of the LiveCallbackDesigner class are listed below. For a complete list of LiveCallbackDesigner class members, see the LiveCallbackDesigner Members topic.

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ControlDesigner) | Initializes the designer and loads the specified component.
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

LiveCallbackDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveCallbackDesigner Properties

The properties of the LiveCallbackDesigner class are listed below. For a complete list of LiveCallbackDesigner class members, see the LiveCallbackDesigner Members topic.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

See Also

LiveCallbackDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveDataGridDesigner Class

Summary description for LiveDataGridDesigner.

For a list of all members of this type, see LiveDataGridDesigner Members.

System.Object
ComponentDesigner
HtmlControlDesigner
ControlDesigner
LiveDataGridDesigner

[Visual Basic]
Public Class LiveDataGridDesigner
Inherits ControlDesigner
[C#]
public class LiveDataGridDesigner : ControlDesigner

Requirements

Namespace: Dart.PowerWEB.LiveControls.Design Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveDataGridDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveDataGridDesigner.GetDesignTimeHtml Method

[Visual Basic]
Overrides Public Function GetDesignTimeHtml() As String
[C#]
public override string GetDesignTimeHtml();

Return Value

See Also

LiveDataGridDesigner Class | LiveDataGridDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveDataGridDesigner.Initialize Method

[Visual Basic]
Overrides Public Sub Initialize( _
   ByVal component As IComponent _
) Implements _
   IDesigner.Initialize
[C#]
public override void Initialize(
   IComponent component
);

Parameters

component

Implements

IDesigner.Initialize

See Also

LiveDataGridDesigner Class | LiveDataGridDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveDataGridDesigner.Verbs Property

[Visual Basic]
Overrides Public ReadOnly Property Verbs As DesignerVerbCollection Implements _
   IDesigner.Verbs
[C#]
public override System.ComponentModel.Design.DesignerVerbCollection Verbs {get;}

Implements

IDesigner.Verbs

See Also

LiveDataGridDesigner Class | LiveDataGridDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveDataGridDesigner Constructor

Initializes a new instance of the LiveDataGridDesigner class.

[Visual Basic]
Public Sub New()
[C#]
public LiveDataGridDesigner();

See Also

LiveDataGridDesigner Class | LiveDataGridDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveDataGridDesigner Members

Public Instance Constructors

LiveDataGridDesigner Constructor Initializes a new instance of the LiveDataGridDesigner class.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize |
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

LiveDataGridDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveDataGridDesigner Methods

The methods of the LiveDataGridDesigner class are listed below. For a complete list of LiveDataGridDesigner class members, see the LiveDataGridDesigner Members topic.

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize |
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

LiveDataGridDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveDataGridDesigner Properties

The properties of the LiveDataGridDesigner class are listed below. For a complete list of LiveDataGridDesigner class members, see the LiveDataGridDesigner Members topic.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

See Also

LiveDataGridDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveMessageBoxDesigner Class

For a list of all members of this type, see LiveMessageBoxDesigner Members.

System.Object
ComponentDesigner
HtmlControlDesigner
ControlDesigner
LiveMessageBoxDesigner

[Visual Basic]
Public Class LiveMessageBoxDesigner
Inherits ControlDesigner
[C#]
public class LiveMessageBoxDesigner : ControlDesigner

Requirements

Namespace: Dart.PowerWEB.LiveControls.Design Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveMessageBoxDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveMessageBoxDesigner.GetDesignTimeHtml Method

[Visual Basic]
Overrides Public Function GetDesignTimeHtml() As String
[C#]
public override string GetDesignTimeHtml();

Return Value

See Also

LiveMessageBoxDesigner Class | LiveMessageBoxDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveMessageBoxDesigner.Verbs Property

[Visual Basic]
Overrides Public ReadOnly Property Verbs As DesignerVerbCollection Implements _
   IDesigner.Verbs
[C#]
public override System.ComponentModel.Design.DesignerVerbCollection Verbs {get;}

Implements

IDesigner.Verbs

See Also

LiveMessageBoxDesigner Class | LiveMessageBoxDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveMessageBoxDesigner Constructor

Initializes a new instance of the LiveMessageBoxDesigner class.

[Visual Basic]
Public Sub New()
[C#]
public LiveMessageBoxDesigner();

See Also

LiveMessageBoxDesigner Class | LiveMessageBoxDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveMessageBoxDesigner Members

Public Instance Constructors

LiveMessageBoxDesigner Constructor Initializes a new instance of the LiveMessageBoxDesigner class.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ControlDesigner) | Initializes the designer and loads the specified component.
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

LiveMessageBoxDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveMessageBoxDesigner Methods

The methods of the LiveMessageBoxDesigner class are listed below. For a complete list of LiveMessageBoxDesigner class members, see the LiveMessageBoxDesigner Members topic.

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ControlDesigner) | Initializes the designer and loads the specified component.
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

LiveMessageBoxDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveMessageBoxDesigner Properties

The properties of the LiveMessageBoxDesigner class are listed below. For a complete list of LiveMessageBoxDesigner class members, see the LiveMessageBoxDesigner Members topic.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

See Also

LiveMessageBoxDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LivePlaceHolderDesigner Class

For a list of all members of this type, see LivePlaceHolderDesigner Members.

System.Object
ComponentDesigner
HtmlControlDesigner
ControlDesigner
LivePlaceHolderDesigner

[Visual Basic]
Public Class LivePlaceHolderDesigner
Inherits ControlDesigner
[C#]
public class LivePlaceHolderDesigner : ControlDesigner

Requirements

Namespace: Dart.PowerWEB.LiveControls.Design Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LivePlaceHolderDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LivePlaceHolderDesigner.GetDesignTimeHtml Method

[Visual Basic]
Overrides Public Function GetDesignTimeHtml() As String
[C#]
public override string GetDesignTimeHtml();

Return Value

See Also

LivePlaceHolderDesigner Class | LivePlaceHolderDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LivePlaceHolderDesigner.Verbs Property

[Visual Basic]
Overrides Public ReadOnly Property Verbs As DesignerVerbCollection Implements _
   IDesigner.Verbs
[C#]
public override System.ComponentModel.Design.DesignerVerbCollection Verbs {get;}

Implements

IDesigner.Verbs

See Also

LivePlaceHolderDesigner Class | LivePlaceHolderDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LivePlaceHolderDesigner Constructor

Initializes a new instance of the LivePlaceHolderDesigner class.

[Visual Basic]
Public Sub New()
[C#]
public LivePlaceHolderDesigner();

See Also

LivePlaceHolderDesigner Class | LivePlaceHolderDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LivePlaceHolderDesigner Members

Public Instance Constructors

LivePlaceHolderDesigner Constructor Initializes a new instance of the LivePlaceHolderDesigner class.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ControlDesigner) | Initializes the designer and loads the specified component.
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

LivePlaceHolderDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LivePlaceHolderDesigner Methods

The methods of the LivePlaceHolderDesigner class are listed below. For a complete list of LivePlaceHolderDesigner class members, see the LivePlaceHolderDesigner Members topic.

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ControlDesigner) | Initializes the designer and loads the specified component.
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

LivePlaceHolderDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LivePlaceHolderDesigner Properties

The properties of the LivePlaceHolderDesigner class are listed below. For a complete list of LivePlaceHolderDesigner class members, see the LivePlaceHolderDesigner Members topic.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

See Also

LivePlaceHolderDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveSoundDesigner Class

For a list of all members of this type, see LiveSoundDesigner Members.

System.Object
ComponentDesigner
HtmlControlDesigner
ControlDesigner
LiveSoundDesigner

[Visual Basic]
Public Class LiveSoundDesigner
Inherits ControlDesigner
[C#]
public class LiveSoundDesigner : ControlDesigner

Requirements

Namespace: Dart.PowerWEB.LiveControls.Design Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveSoundDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveSoundDesigner.GetDesignTimeHtml Method

[Visual Basic]
Overrides Public Function GetDesignTimeHtml() As String
[C#]
public override string GetDesignTimeHtml();

Return Value

See Also

LiveSoundDesigner Class | LiveSoundDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveSoundDesigner.Verbs Property

[Visual Basic]
Overrides Public ReadOnly Property Verbs As DesignerVerbCollection Implements _
   IDesigner.Verbs
[C#]
public override System.ComponentModel.Design.DesignerVerbCollection Verbs {get;}

Implements

IDesigner.Verbs

See Also

LiveSoundDesigner Class | LiveSoundDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveSoundDesigner Constructor

Initializes a new instance of the LiveSoundDesigner class.

[Visual Basic]
Public Sub New()
[C#]
public LiveSoundDesigner();

See Also

LiveSoundDesigner Class | LiveSoundDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveSoundDesigner Members

Public Instance Constructors

LiveSoundDesigner Constructor Initializes a new instance of the LiveSoundDesigner class.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ControlDesigner) | Initializes the designer and loads the specified component.
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

LiveSoundDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveSoundDesigner Methods

The methods of the LiveSoundDesigner class are listed below. For a complete list of LiveSoundDesigner class members, see the LiveSoundDesigner Members topic.

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ControlDesigner) | Initializes the designer and loads the specified component.
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

LiveSoundDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveSoundDesigner Properties

The properties of the LiveSoundDesigner class are listed below. For a complete list of LiveSoundDesigner class members, see the LiveSoundDesigner Members topic.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

See Also

LiveSoundDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveTimerDesigner Class

For a list of all members of this type, see LiveTimerDesigner Members.

System.Object
ComponentDesigner
HtmlControlDesigner
ControlDesigner
LiveTimerDesigner

[Visual Basic]
Public Class LiveTimerDesigner
Inherits ControlDesigner
[C#]
public class LiveTimerDesigner : ControlDesigner

Requirements

Namespace: Dart.PowerWEB.LiveControls.Design Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

LiveTimerDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveTimerDesigner.GetDesignTimeHtml Method

[Visual Basic]
Overrides Public Function GetDesignTimeHtml() As String
[C#]
public override string GetDesignTimeHtml();

Return Value

See Also

LiveTimerDesigner Class | LiveTimerDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveTimerDesigner.Verbs Property

[Visual Basic]
Overrides Public ReadOnly Property Verbs As DesignerVerbCollection Implements _
   IDesigner.Verbs
[C#]
public override System.ComponentModel.Design.DesignerVerbCollection Verbs {get;}

Implements

IDesigner.Verbs

See Also

LiveTimerDesigner Class | LiveTimerDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveTimerDesigner Constructor

Initializes a new instance of the LiveTimerDesigner class.

[Visual Basic]
Public Sub New()
[C#]
public LiveTimerDesigner();

See Also

LiveTimerDesigner Class | LiveTimerDesigner Members | Dart.PowerWEB.LiveControls.Design Namespace


LiveTimerDesigner Members

Public Instance Constructors

LiveTimerDesigner Constructor Initializes a new instance of the LiveTimerDesigner class.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ControlDesigner) | Initializes the designer and loads the specified component.
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

LiveTimerDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveTimerDesigner Methods

The methods of the LiveTimerDesigner class are listed below. For a complete list of LiveTimerDesigner class members, see the LiveTimerDesigner Members topic.

Public Instance Methods

Dispose (inherited from ComponentDesigner) | Releases all resources used by the ComponentDesigner .
DoDefaultAction (inherited from ComponentDesigner) | Creates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location in preparation for assigning the default action.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetDesignTimeHtml |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetPersistInnerHtml (inherited from ControlDesigner) | Gets the persistable inner HTML of the control.
GetType (inherited from Object) | Gets the Type of the current instance.
Initialize (inherited from ControlDesigner) | Initializes the designer and loads the specified component.
InitializeNonDefault (inherited from ComponentDesigner) | Initializes the settings for an imported component that is already initialized to settings other than the defaults.
IsPropertyBound (inherited from ControlDesigner) | Gets a value indicating whether the specified property is data-bound.
OnComponentChanged (inherited from ControlDesigner) | Called when the component changes.
OnSetComponentDefaults (inherited from ComponentDesigner) | Sets the default properties for the component.
OnSetParent (inherited from HtmlControlDesigner) | Provides an opportunity to perform when the associated control is parented.
RaiseResizeEvent (inherited from ControlDesigner) | Raises the OnControlResize event.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateDesignTimeHtml (inherited from ControlDesigner) | Refreshes the display of the control.

Explicit Interface Implementations

IDesignerFilter.PostFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PostFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PostFilterProperties (inherited from ComponentDesigner)
IDesignerFilter.PreFilterAttributes (inherited from ComponentDesigner)
IDesignerFilter.PreFilterEvents (inherited from ComponentDesigner)
IDesignerFilter.PreFilterProperties (inherited from ComponentDesigner)

See Also

LiveTimerDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


LiveTimerDesigner Properties

The properties of the LiveTimerDesigner class are listed below. For a complete list of LiveTimerDesigner class members, see the LiveTimerDesigner Members topic.

Public Instance Properties

AllowResize (inherited from ControlDesigner) | Gets a value indicating whether the control can be resized.
AssociatedComponents (inherited from ComponentDesigner) | Gets the collection of components associated with this designer.
Behavior (inherited from HtmlControlDesigner) | Gets or sets the DHTML behavior associated with the designer instance.
Component (inherited from ComponentDesigner) | Gets the component this designer is designing.
DataBindings (inherited from HtmlControlDesigner) | Gets or sets the data bindings for the current control.
DesignTimeHtmlRequiresLoadComplete (inherited from ControlDesigner) | Gets a value indicating whether the designer must have completed loading before the design-time HTML can be used.
ID (inherited from ControlDesigner) | Gets or sets the ID string for the control.
IsDirty (inherited from ControlDesigner) | Gets or sets a value indicating whether the Web server control has been marked as changed.
ReadOnly (inherited from ControlDesigner) | Gets or sets a value indicating whether the properties of the control are read-only at design-time.
ShouldCodeSerialize (inherited from HtmlControlDesigner) | Gets or sets a value indicating whether a field declaration for the control should be created in the code-behind file for the current design document during serialization.
Verbs |

See Also

LiveTimerDesigner Class | Dart.PowerWEB.LiveControls.Design Namespace


PropertyBuilder Class

For a list of all members of this type, see PropertyBuilder Members.

System.Object
ComponentEditor
WindowsFormsComponentEditor
PropertyBuilder

[Visual Basic]
Public Class PropertyBuilder
Inherits WindowsFormsComponentEditor
[C#]
public class PropertyBuilder : WindowsFormsComponentEditor

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

PropertyBuilder Members | Dart.PowerWEB.LiveControls Namespace


EditComponent Method

PowerWEB LiveControls for ASP.NET

PropertyBuilder.EditComponent Method

Overload List

public override bool EditComponent(ITypeDescriptorContext,object,IWin32Window);

Inherited from WindowsFormsComponentEditor.

public override bool EditComponent(ITypeDescriptorContext,object);

Inherited from WindowsFormsComponentEditor.

public bool EditComponent(object,IWin32Window);

Inherited from ComponentEditor.

public bool EditComponent(object);

See Also

PropertyBuilder Class | PropertyBuilder Members | Dart.PowerWEB.LiveControls Namespace


PropertyBuilder.EditComponent Method (ITypeDescriptorContext, Object, IWin32Window)

[Visual Basic]
Overrides Overloads Public Function EditComponent( _
   ByVal context As ITypeDescriptorContext, _
   ByVal component As Object, _
   ByVal owner As IWin32Window _
) As Boolean
[C#]
public override bool EditComponent(
   ITypeDescriptorContext context,
   object component,
   IWin32Window owner
);

Parameters

context
component
owner

Return Value

See Also

PropertyBuilder Class | PropertyBuilder Members | Dart.PowerWEB.LiveControls Namespace | PropertyBuilder.EditComponent Overload List


PropertyBuilder Constructor

Initializes a new instance of the PropertyBuilder class.

[Visual Basic]
Public Sub New()
[C#]
public PropertyBuilder();

See Also

PropertyBuilder Class | PropertyBuilder Members | Dart.PowerWEB.LiveControls Namespace


PropertyBuilder Members

Public Instance Constructors

PropertyBuilder Constructor Initializes a new instance of the PropertyBuilder class.

Public Instance Methods

EditComponent | Overloaded.
EditComponent (inherited from WindowsFormsComponentEditor) | Creates an editor window that allows the user to edit the specified component, using the specified context information.
EditComponent (inherited from WindowsFormsComponentEditor) | Creates an editor window that allows the user to edit the specified component, using the specified window which owns the component.
EditComponent (inherited from ComponentEditor) | Edits the component and returns a value indicating whether the component was modified.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

PropertyBuilder Class | Dart.PowerWEB.LiveControls Namespace


PropertyBuilder Methods

The methods of the PropertyBuilder class are listed below. For a complete list of PropertyBuilder class members, see the PropertyBuilder Members topic.

Public Instance Methods

EditComponent | Overloaded.
EditComponent (inherited from WindowsFormsComponentEditor) | Creates an editor window that allows the user to edit the specified component, using the specified context information.
EditComponent (inherited from WindowsFormsComponentEditor) | Creates an editor window that allows the user to edit the specified component, using the specified window which owns the component.
EditComponent (inherited from ComponentEditor) | Edits the component and returns a value indicating whether the component was modified.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

PropertyBuilder Class | Dart.PowerWEB.LiveControls Namespace


Shared Class

Summary description for Shared.

For a list of all members of this type, see Shared Members.

System.Object
Shared

[Visual Basic]
Public Class Shared
[C#]
public class Shared

Requirements

Namespace: Dart.PowerWEB.LiveControls Namespace

Assembly: Dart.PowerWEB.LiveControls.dll

See Also

Shared Members | Dart.PowerWEB.LiveControls Namespace


Shared Constructor

Initializes a new instance of the Shared class.

[Visual Basic]
Public Sub New()
[C#]
public Shared();

See Also

Shared Class | Shared Members | Dart.PowerWEB.LiveControls Namespace


Shared Members

Public Instance Constructors

Shared Constructor Initializes a new instance of the Shared class.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

Shared Class | Dart.PowerWEB.LiveControls Namespace


Welcome to the PowerWEB TextBox for ASP.NET Documentation

PowerWEB LiveControls for ASP.NET

PowerWEB LiveControls for ASP.NET Documentation

PowerWEB LiveControls for ASP.NET is a suite of ASP.NET controls that trigger events in Code-Behind, much like regular ASP.NET controls, but do not require the client browser to be refreshed when data is sent back to the browser. This technique allows for the development of richer and cleaner web applications by eliminating the flicker and delays associated with a browser refresh, providing a much more Windows-like behavior to the application.

The LiveControls include:

  1. LiveButton
  2. LiveCallback
  3. LiveCheckBox
  4. LiveCheckBoxList
  5. LiveDataGrid
  6. LiveDropDownList
  7. LiveHyperLink
  8. LiveImage
  9. LiveImageButton
  10. LiveLabel
  11. LiveLinkButton
  12. LiveListBox
  13. LiveMessageBox
  14. LivePanel
  15. LivePlaceHolder
  16. LiveRadioButton
  17. LiveRadioButtonList
  18. LiveSound
  19. LiveTextBox
  20. LiveTimer

Key Features Include:

  • The ability to manipulate non-LiveControls in Code-Behaind and have them updated on the client without a refresh (this is not guaranteed to work with all 3rd party controls).
  • Addition of Windows-like mouse, key, and click events to visual LiveControls.
  • No need for Java applets, Flash, or complex JavaScript.
  • Will automatically fallback to postbacks when supported un-supported browser detected.
  • Compatible with IE 5.0 +, IE 5 Mac, Mozilla 1.3+, Mozilla 1.3+ Mac, Galeon, Konqueror and Opera 5.
  • The ability of controls to operate in blocking or non-blocking manner on the client.
  • A LiveTimer that is capable of polling the server at a specified interval.
  • An architecture designed to limit the amount of data that LiveControls will send round-trip in order to maximize performance.
  • A server-side persistance model that limits round-trip data, maximizing performance.
  • A LiveCallback control that easily enables "Remote Scripting" implementations.
  • Compatible with all versions of the .NET Framework

Microsoft Help 2.0 integration with comprehensive F1 support is included to get developers up-and-running in the shortest possible time, plus dozens of tutorials and samples.

Dart Communications has been a leading provider of components for Microsoft developers for the past 10 years with its market leading PowerTCP line of Internet components. As a Microsoft VSIP Partner and an original member of the .NET Early Adaptor Program, Dart has worked closely with Microsoft throughout the development of our .NET Framework components and controls. The design decisions incorporated into the product reflect the most effective techniques for developing a user-friendly, but powerful component in the Microsoft .NET Framework. These techniques not only reflect the actual code design, but also extend to documentation, incorporating the Microsoft Help 2.0 engine that includes integrated dynamic Help within the development environment.

Thank you for choosing PowerWEB for ASP.NET. We hope you will agree that this product is a perfect complement to the .NET Framework, bringing you the quality and value you have learned to expect from Dart Communications.

In PowerWEB LiveControls for ASP.NET Documentation.

Getting Started
Provides an overview of PowerWEB LiveControls for ASP.NET and discusses such topics as distribution, licensing, and support.
Using PowerWEB in VS.NET
Provides step-by-step instructions for creating a project using VS.NET, integrating PowerWEB LiveControls for ASP.NET, and creating a simple application.
Using PowerWEB with Notepad
Provides step-by-step instructions for creating a simple project using notepad only.
Optimizing Performance
Discusses techniques for optimizing performance of the the PowerWEB LiveControls for ASP.NET, including reducing ViewState and render-size.
Advanced Topics
Discusses advanced implementations of the PowerWEB LiveControls for ASP.NET.
Reference
Provides a language/syntax and client-side API reference for PowerWEB LiveControls for ASP.NET.
Samples
Describes the samples that are installed with PowerWEB LiveControls for ASP.NET.

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.


LiveVote Sample

Description: An example of to construct a voting mechanism that lets users watch the live voting results rather than refreshing the page to see a snapshot in time.

Virtual Directory: PowerWEB_LiveControls_CSharp, PowerWEB_LiveControls_VB

Requirements

Assemblies: Dart.PowerWEB.LiveControls

See Also

Reference | Advanced Topics

Send comments on this topic.

© 2004 Dart Communications. All rights reserved.