You can also add script to the Attributes of a server control. For instance, cboSurveyType is a drop down billingMethod is the js I want to invoke via the onChange event... Important: place in a "if (!this.IsPostBack)" block PS: toBad you can't add it via prop page... very shortsighted of ms... protected void Page_Load(object sender, EventArgs e) { try { if (!this.IsPostBack) { cboSurveyType.Attributes.Add("onChange", "billingMethod();"); } } finally { } }
S
stephenSmithJ
@stephenSmithJ
Posts
-
JavaScript can be used in ASP.net ? -
how to use css in asp.netNote vs2007 is horrible for css. - it is highly inefficient. & master pages/themes just don't cut it for high end css... Instead, design/create your page in Dreamweaver or other web design tool & do your vb/c# coding in vs2007. Then, you can link to an external css file as follows: This is much more efficient in terms of bandwidth.