logo

ASP.NET attributes overriding control javascript events

This code snippet demonstrates how to insert a javascript code overriding the ASP.NET default control handling code

lbxExpVendor.Attributes.Add("OnChange", "ctl00$ContentPlaceHolder1$txtExpVendor.value
=ctl00$ContentPlaceHolder1$lbxExpVendor
.options[ctl00$ContentPlaceHolder1$lbxtxpVendor.selectedIndex].text;")
        lbxExpVendor.AutoPostBack = False
s