473,405 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

asp.net dropdown control

hi,

i have <asp:dropdownlist> control in my form. I want to write a client
side script when the selected index changed. any code or ideas how to
do it?
venky

Nov 19 '05 #1
4 1093
you should be able to add an .Attribute with an onClick in it, to call the
clientside function

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"venky" <ve************@yahoo.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
hi,

i have <asp:dropdownlist> control in my form. I want to write a client
side script when the selected index changed. any code or ideas how to
do it?
venky

Nov 19 '05 #2
Venky:
I think what Curt meant was to add an OnChange attribute, not onclick as per
your request; such as:
myDropDown.Attributes.Add("OnChange", "myClientSideFunction")

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:us**************@TK2MSFTNGP10.phx.gbl...
you should be able to add an .Attribute with an onClick in it, to call the
clientside function

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"venky" <ve************@yahoo.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
hi,

i have <asp:dropdownlist> control in my form. I want to write a client
side script when the selected index changed. any code or ideas how to
do it?
venky


Nov 19 '05 #3
yeah... my bad....
thanks.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OG**************@TK2MSFTNGP14.phx.gbl...
Venky:
I think what Curt meant was to add an OnChange attribute, not onclick as
per your request; such as:
myDropDown.Attributes.Add("OnChange", "myClientSideFunction")

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:us**************@TK2MSFTNGP10.phx.gbl...
you should be able to add an .Attribute with an onClick in it, to call
the clientside function

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"venky" <ve************@yahoo.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
hi,

i have <asp:dropdownlist> control in my form. I want to write a client
side script when the selected index changed. any code or ideas how to
do it?
venky



Nov 19 '05 #4
thanks and it worked fine for me.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #5

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

Similar topics

0
by: Manish | last post by:
Hi All, I'm having this problem I hope someone can help provide a solution for it :) I've this dropdown list box in a usercontrol which I'm populating from the database (it's viewstate property...
1
by: Mad Scientist Jr | last post by:
I don't know how this is happening, but a dropdown control I have is resetting to the 2nd value on the list anytime a postback occurs. I have no initiation code outside of If Not (IsPostBack) ...
4
by: Simon Harvey | last post by:
Hi all, Am I being really stupid here: myDropDown.SelectedIndex = 2 I think this line should set the dropdown control's selected item to 2. But nothing seems to be happening on the page....
0
by: Kay | last post by:
Hello, I have developed a web custom control, I want one of the properties of the control to appear as a dropdown list so the user can select from the list. My question is: how do I define an...
5
by: jung_h_park | last post by:
From: jung_h_park@yahoo.com Newsgroups: microsoft.public.dotnet.framework.aspnet Subject: Dropdown List not retaining its SelectedValue Date: Mon, 26 Jun 2006 21:02:57 -0700 Hello, My...
0
by: Kay | last post by:
Hello, I have written my own custom control and I want one of its properties to display as a dropdown list when clicked, so the user can select from the list, it would be similar to the asp...
0
by: Kay O'Keeffe | last post by:
Hello, I have written my own custom control and I want one of its properties to display as a dropdown list when clicked, so the user can select from the list, it would be similar to the asp...
3
by: =?Utf-8?B?bGpsZXZlbmQy?= | last post by:
I need to show a custom control in the DropDown of a Windows.Forms.ToolStripMenuItem (e.g., similar to the Font Color menu item in Word except that the control is specific to my application). I...
0
by: progman417 | last post by:
I have a gridview with a dropdown list in an EditItemTemplate. I haven't set a width for the columns, so that they dynamically size according to the data displayed. When it goes into edit...
5
by: =?Utf-8?B?Y2hlY2tyYWlzZXJAY29tbXVuaXR5Lm5vc3BhbQ== | last post by:
I have a VS 2008 ASP.NET webform that has a reportview tag on it, accessing an .RLDC report in local report. The columns for the report are essentially: Month Item #1 Item#2 Item#3 ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.