Link to home
Start Free TrialLog in
Avatar of annmampilly
annmampilly

asked on

Lostfocus in C# dropdownlist

Like the lost focus event for a dropdownlist in VB6, is there any similar event which i can use in C# web application.
Avatar of TSmooth
TSmooth

You can add the "onBlur" attribute to the dropdownlist which can call some javascript which if need be can in turn call a web service or use ajax to communicate back to the server.

<asp:DropDownList ID="DropDownList1" runat="server" onBlur="javascript: alert('lost focus');"></asp:DropDownList>
Avatar of annmampilly

ASKER

I tried it. but the error message i got is
Attribute 'onBlur' is not a valid attribute of element dropdownlist.

Is there any other solution for it?
ASKER CERTIFIED SOLUTION
Avatar of TSmooth
TSmooth

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial