This is because you are compiling your page before the javascript runs. Try adding the javascript to your page before you call your code. Example is below:
If Not Page.IsPostBack Then
If Not Page.IsClientScriptBlockRegistered("IncludedJavascript") Then
Page.RegisterClientScriptBlock("IncludedJavascript", "<SCRIPT Language=""JavaScript"" src=""javascriptincludedfile.js""></SCRIPT>")
End If
ddlid.Attributes.Add("onchange","javascript:callfunction(this);")
End If
Last edited by SheSaidImaPregy; Nov 8th, 2007 at 1:03 pm.