Здравствуйте, agzis1, Вы писали:
A>Здравствуйте, Dikaaa, Вы писали:
A>>>A kakoj versii ASP.NET 1.1 ili 2?
D>>2.0
A>public void Page_Load(Object sender, EventArgs e) A> { A> // Define the name and type of the client script on the page. A> String csname = "OnSubmitScript"; A> Type cstype = this.GetType();
A> // Get a ClientScriptManager reference from the Page class. A> ClientScriptManager cs = Page.ClientScript;
A> // Check to see if the OnSubmit statement is already registered. A> if (!cs.IsOnSubmitStatementRegistered(cstype, csname)) A> { A> String cstext = @" A> var i, val, controlFailedValidation; A> for (i = 0; i < Page_Validators.length; i++) A> { A> val = Page_Validators[i];
A> if (! val.isvalid) A> { A> controlFailedValidation = val.controltovalidate; A> // *** menyaj/podkrashivaj control zdes' A> // *** ispol'zuya style A> controlFailedValidation.style.bgcolor = 'red'; A> }
A> } A> "; A> cs.RegisterOnSubmitStatement(cstype, csname, cstext); A> }
A> }