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