Home All Groups Group Topic Archive Search About
Author
20 May 2005 3:49 PM
abcd
I am using Web Server controls on my page. I want to dispalay error message
prompts and other dynamically font and color changes depending upon the user
selection. I have set AutoPostBack = true for all controls like text, radio,
dropDoenlist. So when ever the control is touched it fires an AutoPostBack
and the page is submitted. Somehow this frequent trips to server is the
cause for slowness of my application. What are the best methods to include
Web server controls and client side scripts...so that validations can be
done without making trip to server

thanks

Author
20 May 2005 8:39 PM
MrMike
You haven't specified what types of errors you are looking for, but the
following controls (available in the ASP.NET Webform Toolbox), will perform
client-side validation without posting back.

- RequiredFieldValidator
- CompareValidator
- RangeValidator
- RegularExpressionValidator
- CustomValidator

Show quoteHide quote
"abcd" wrote:

> I am using Web Server controls on my page. I want to dispalay error message
> prompts and other dynamically font and color changes depending upon the user
> selection. I have set AutoPostBack = true for all controls like text, radio,
> dropDoenlist. So when ever the control is touched it fires an AutoPostBack
> and the page is submitted. Somehow this frequent trips to server is the
> cause for slowness of my application. What are the best methods to include
> Web server controls and client side scripts...so that validations can be
> done without making trip to server
>
> thanks
>
>
>
Author
20 May 2005 9:03 PM
abcd
I have a simple form in ASP which has text boxes and update button. In ASP I
can ember JavaScript code and check the values using document object model
and if that doesnt match then I can stop it from submitting and set the
focus to the incorrect text box...

I am re-engineering the asp form using Web form asp.net , web server
controls....all my code runs at server side ...I was wondering what the what
are the best methods to diplay the validation information and set the focus
to the incorrect control ......

thanks


Show quoteHide quote
"MrMike" <MrM***@discussions.microsoft.com> wrote in message
news:69F04E06-91CD-45BA-88E9-0F0D573665EF@microsoft.com...
> You haven't specified what types of errors you are looking for, but the
> following controls (available in the ASP.NET Webform Toolbox), will
> perform
> client-side validation without posting back.
>
> - RequiredFieldValidator
> - CompareValidator
> - RangeValidator
> - RegularExpressionValidator
> - CustomValidator
>
> "abcd" wrote:
>
>> I am using Web Server controls on my page. I want to dispalay error
>> message
>> prompts and other dynamically font and color changes depending upon the
>> user
>> selection. I have set AutoPostBack = true for all controls like text,
>> radio,
>> dropDoenlist. So when ever the control is touched it fires an
>> AutoPostBack
>> and the page is submitted. Somehow this frequent trips to server is the
>> cause for slowness of my application. What are the best methods to
>> include
>> Web server controls and client side scripts...so that validations can be
>> done without making trip to server
>>
>> thanks
>>
>>
>>
Author
21 May 2005 4:30 PM
Peter Blum
The AutoPostBack properties of the data entry web controls do not validate
before submitting. There are a couple of solutions to this:

1. ASP.NET 2.0 (now in beta) allows you to validate the page and stops
submitting if its not valid. You will find a new property on the dataentry
controls, CausesValidation. Set it to true for this feature.

2. My Professional Validation And More
(http://www.peterblum.com/vam/home.aspx) is a replacement to ASP.NET
validators that addresses the numerous limitations of the built-in
validators. (For the limitations I've found, see
http://www.peterblum.com/vam/valmain.aspx.) One of its many features is the
ability to validate before posting back. I supply a textbox control (based
on the original TextBox) with an AutoPostBackValidates property. I also
supply documentation to attach validation into the autopostback of other
data entry controls.

--- Peter Blum
www.PeterBlum.com
Email: PLB***@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

Show quoteHide quote
"abcd" <a***@abcd.com> wrote in message
news:eakMx9XXFHA.2684@TK2MSFTNGP09.phx.gbl...
>I have a simple form in ASP which has text boxes and update button. In ASP
>I can ember JavaScript code and check the values using document object
>model and if that doesnt match then I can stop it from submitting and set
>the focus to the incorrect text box...
>
> I am re-engineering the asp form using Web form asp.net , web server
> controls....all my code runs at server side ...I was wondering what the
> what are the best methods to diplay the validation information and set the
> focus to the incorrect control ......
>
> thanks
>
>
> "MrMike" <MrM***@discussions.microsoft.com> wrote in message
> news:69F04E06-91CD-45BA-88E9-0F0D573665EF@microsoft.com...
>> You haven't specified what types of errors you are looking for, but the
>> following controls (available in the ASP.NET Webform Toolbox), will
>> perform
>> client-side validation without posting back.
>>
>> - RequiredFieldValidator
>> - CompareValidator
>> - RangeValidator
>> - RegularExpressionValidator
>> - CustomValidator
>>
>> "abcd" wrote:
>>
>>> I am using Web Server controls on my page. I want to dispalay error
>>> message
>>> prompts and other dynamically font and color changes depending upon the
>>> user
>>> selection. I have set AutoPostBack = true for all controls like text,
>>> radio,
>>> dropDoenlist. So when ever the control is touched it fires an
>>> AutoPostBack
>>> and the page is submitted. Somehow this frequent trips to server is the
>>> cause for slowness of my application. What are the best methods to
>>> include
>>> Web server controls and client side scripts...so that validations can be
>>> done without making trip to server
>>>
>>> thanks
>>>
>>>
>>>
>
>