Client Script for server controls..

Discussion in 'ASP .Net' started by Jerry Camel, Oct 20, 2005.

  1. Jerry Camel

    Jerry Camel Guest

    Is there a way to have a server control run client side script? Seems if I
    try to set an onSelectedIndexChanged event handler for an ASP dropDownList,
    it won't compile. Is there a way to have some event strigger client side
    script and some trigger server code? Thanks.

    Jerry
    Jerry Camel, Oct 20, 2005
    #1
    1. Advertising

  2. Jerry Camel

    Raul Macias Guest

    Let's say the name of your drop-down list is myCombo:

    myCombo.Attributes.Add("onchange", "myFunction();");

    where "myFunction" is the name of your client side event handler

    -Raul

    "Jerry Camel" <> wrote in message
    news:...
    > Is there a way to have a server control run client side script? Seems if
    > I
    > try to set an onSelectedIndexChanged event handler for an ASP
    > dropDownList,
    > it won't compile. Is there a way to have some event strigger client side
    > script and some trigger server code? Thanks.
    >
    > Jerry
    >
    >
    Raul Macias, Oct 20, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Don Parker
    Replies:
    4
    Views:
    3,090
    Don Parker
    Jan 3, 2005
  2. Magnus Blomberg
    Replies:
    3
    Views:
    715
    Magnus Blomberg
    Apr 14, 2005
  3. -
    Replies:
    2
    Views:
    392
    Alan Krueger
    Jul 29, 2005
  4. Weston Weems

    Server Controls and Client Script interaction

    Weston Weems, Dec 1, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    95
    Weston Weems
    Dec 1, 2004
  5. Cathryn Lindner

    client side script with server side controls

    Cathryn Lindner, Oct 24, 2003, in forum: Javascript
    Replies:
    1
    Views:
    135
    Thomas 'PointedEars' Lahn
    Nov 23, 2003
Loading...

Share This Page