Re: Creating a validationsummary
From: Chris Jackson (chrisjATmvpsDOTorgNOSPAM)
Date: 02/13/04
- Next message: Kevin Spencer: "Re: Please Help!"
- Previous message: Michael Murschell: "Image Object pointing to a JPG"
- In reply to: Christer: "Creating a validationsummary"
- Next in thread: Peter Blum: "Re: Creating a validationsummary"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 13 Feb 2004 11:11:14 -0500
I have not undertaken this particular task, though I have called the
validation scripts by hand on several occasions. So, thinking about the
problem, there are a couple of different approaches that I can think of.
First, you could step through the client side validation scripts, and see
what methods are doing the tasks that you want. You can then build your own
script that calls into these scripts where you want to use their
functionality, but then handles the display when you want to have control.
Alternately, you know that there is an option to have these messages display
on the page instead of popping up a message box. You could use
Attributes.Add to attach an onchange event handler when the script updates
these controls, and then use the text in here to create your own popup
window.
-- Chris Jackson Software Engineer Microsoft MVP - Windows Client Windows XP Associate Expert -- More people read the newsgroups than read my email. Reply to the newsgroup for a faster response. (Control-G using Outlook Express) -- "Christer" <winterdk@hotmail.com> wrote in message news:7beadfe3.0402121206.660d27b3@posting.google.com... > Hi all! > > I recently created a MessageBox webcontrol for asp.net. This can be > used as is, but I also want to take ude of it in other webcontrols. > Right now i creating a ValidationSummary control, that makes use of my > messagebox to show the summary of failing validators. > > So far I've been successfull achieving this. However, the serverside > nature of the MessageBox currently forces all validators (and the > validationsummary) to have EnableClientScript=false. In short this > means that all validations are made on the server, which causes > postbacks. > > The validationsummary webcontrol shipped with the .net framework makes > it possible to have the validationsummary displayed in a javascript > alert-messagebox. I want to recreate the same clientside display with > my own messagebox. In short, write the messagebox to the page in a > hidden state, and show it on demand. > However, the .net valisationsummary alert is created in the included > validation-javascript file (WebUIValidation.js) wich also contains all > the functions for clientside validation so, as I see it, it's quite > impossible to both have clientsidescript enabled on validationcontrols > and summary, and still create my own clientside daisplay of the > failing validator. > > Does any of you out there been in similar situations? Any ideas how to > cut my cake? I'm determined to use the existing clientside > functionality with regards to validation, by I'd like to make my own > display function. > > Kind regards > Christer
- Next message: Kevin Spencer: "Re: Please Help!"
- Previous message: Michael Murschell: "Image Object pointing to a JPG"
- In reply to: Christer: "Creating a validationsummary"
- Next in thread: Peter Blum: "Re: Creating a validationsummary"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|