I forgot to tell that i'm trying to add this script dynamically, in a Page_Load event handler of a page
so the only working solution i've found -
string script = "Sys.Application.add_init(function() {\n" +
" var slider1 = $find('" + SliderExtender1.BehaviorID + "');\n" +
" if (slider1) slider1.add_valueChanged(function() { alert('value changed!'); });\n" +
" });\n";
ScriptManager.RegisterStartupScript(Page, GetType(), "StartupValuesFunction", script, true);