Search:
Namespaces
Discussions
.NET v1.1
Feedback
How to catch Toolbar- ToolbarDropDownList element selected event?
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngwebcontrols' list
.
xiaoningyu@netscape.net
Dear friends,
I couldn't find any maerial about how to catch Toolbar- ToolbarDropDownList element selected event.
Anyone can tell me if Microsoft® Internet Explorer Toolbar WebControls catch
DropDownList
element selected event or not? If yes, how?
Thanks.
Xiaoning
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
Reply to this message...
James Avery
You can capture the event using onchange. It will fire whenever the
dropdownlist is changed.
You can find more information about it here:
http://msdn.microsoft.com/workshop/author/behaviors/library/toolbar/Tool
barDropDownList.asp
-----Original Message-----
From:
Click here to reveal e-mail address
[mailto:
Click here to reveal e-mail address
]
Sent: Tuesday, April 16, 2002 9:28 AM
To: aspngwebcontrols
Subject: [aspngwebcontrols] How to catch Toolbar- ToolbarDropDownList
element selected event?
Dear friends,
I couldn't find any maerial about how to catch Toolbar-
ToolbarDropDownList element selected event.
Anyone can tell me if MicrosoftR Internet Explorer Toolbar WebControls
catch
DropDownList
element selected event or not? If yes, how?
Thanks.
Xiaoning
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/
| [aspngwebcontrols] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngwebcontrols.asp
= JOIN/QUIT
Reply to this message...
xiaoningyu@netscape.net
Dear James,
Thanks for reply. But it still doesn't work. Following is my code, wish you can have a look. Tell me where is wrong.
When I debug the program, only button get respond, stops in ToolbarClick method, but there is no respod when I change the item in the dropdown list.
C# code
----------------------------------------------
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Microsoft.Web.UI.WebControls;
namespace WebApplication1
{
/// <summary>
/// Summary description for
ToolBar
.
/// </summary>
public class
ToolBar
: System.Web.UI.
Page
{
protected Microsoft.Web.UI.WebControls.Toolbar Test_Toolbar;
private void Page_Load(object sender, System.
EventArgs
e)
{
if (!this.IsPostBack)
{
ToolbarDropDownList dropdownlist=new ToolbarDropDownList();
dropdownlist.ID="Drop Down List";
Test_Toolbar.Items.Add(dropdownlist);
dropdownlist.Items.Add("option1");
dropdownlist.Items.Add("option2");
dropdownlist.Items.Add("option3");
ToolbarButton button = new ToolbarButton();
button.Text="button";
button.ID="button";
Test_Toolbar.Items.Add(button);
}
}
#region Web Form Designer generated code
override protected void OnInit(
EventArgs
e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.
EventHandler
(this.Page_Load);
}
#endregion
public void ToolbarClick(object sender,
EventArgs
e)
{
string sendername=sender.ToString();
}
public void Toolbar_OnChange(object sender,
EventArgs
e)
{
string sendername=sender.ToString();
}
}
}
ASPX code
--------------------
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.116, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@
Page
language="c#" Codebehind="ToolBar.aspx.cs" AutoEventWireup="false" Inherits="WebApplication1.ToolBar" %>
<HTML>
<HEAD>
<title>ToolBar</title>
</HEAD>
<body >
<form id="ToolBar" method="post" runat="server">
<iewc:Toolbar id=Test_Toolbar runat="server" AutoPostBack="True" OnButtonClick="ToolbarClick" OnChange="Toolbar_OnChange" OnSelectedIndexChanged="Toolbar_OnChange">
</iewc:Toolbar>
</form>
</body>
</HTML>
----------------------------------------------------------------
"James Avery" <
Click here to reveal e-mail address
> wrote:
[Original message clipped]
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/
Reply to this message...
System.EventArgs
System.EventHandler
System.Web.UI.Page
System.Web.UI.WebControls.DropDownList
System.Windows.Forms.ToolBar
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com