Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Stop ObjectDataSource from refreshing when CustomValidator is false

Reply
Thread Tools

Stop ObjectDataSource from refreshing when CustomValidator is false

 
 
Don
Guest
Posts: n/a
 
      02-29-2008
I have a page with a GridView that uses an ObjectDataSource. The user
can change some parameters on the page and refresh the GridView with a
button click. One of the parameters has a CustomValidator that uses
server side logic to determine if the value is valid.
When the value is invalid my validator displays but the GridView still
refreshes. I think this is because a GridView bound to an
ObjectDataSource always refreshes when any postback is performed. How
can I stop it?


Thanks,
Don
 
Reply With Quote
 
 
 
 
Manish
Guest
Posts: n/a
 
      02-29-2008
Hi Don,

I think you can try the client side validation for your customValidations in
order to avoid postback.

Please refer to the link below if this helps.

http://www.c-sharpcorner.com/UploadF...13805AM/1.aspx

Regards,
Manish
www.ComponentOne.com

"Don" wrote:

> I have a page with a GridView that uses an ObjectDataSource. The user
> can change some parameters on the page and refresh the GridView with a
> button click. One of the parameters has a CustomValidator that uses
> server side logic to determine if the value is valid.
> When the value is invalid my validator displays but the GridView still
> refreshes. I think this is because a GridView bound to an
> ObjectDataSource always refreshes when any postback is performed. How
> can I stop it?
>
>
> Thanks,
> Don
>

 
Reply With Quote
 
 
 
 
Don
Guest
Posts: n/a
 
      02-29-2008
I use client side validation when I can. In this case, I need server
side because I need to use a server side object that queries the
database and applies some business logic.


On Feb 29, 2:17*pm, Manish <Man...@discussions.microsoft.com> wrote:
> Hi Don,
>
> I think you can try the client side validation for your customValidations in
> order to avoid postback.
>
> Please refer to the link below if this helps.
>
> http://www.c-sharpcorner.com/UploadF...3222006013805A...
>
> Regards,
> Manishwww.ComponentOne.com
>
>
>
> "Don" wrote:
> > I have a page with a GridView that uses an ObjectDataSource. *The user
> > can change some parameters on the page and refresh the GridView with a
> > button click. *One of the parameters has a CustomValidator that uses
> > server side logic to determine if the value is valid.
> > When the value is invalid my validator displays but the GridView still
> > refreshes. *I think this is because a GridView bound to an
> > ObjectDataSource always refreshes when any postback is performed. *How
> > can I stop it?

>
> > Thanks,
> > * *Don- Hide quoted text -

>
> - Show quoted text -


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CustomValidator Returns False, but False is Ignored DJ ASP .Net 3 12-27-2007 10:29 AM
Self-refreshing and non-self-refreshing controls Harlan Messinger ASP .Net 1 08-04-2006 01:13 PM
False positive, false intrusion, false alarm Nick Computer Security 3 04-26-2006 07:40 PM
CUSTOMVALIDATOR works but page goes on on FALSE Jose Fernandez ASP .Net 1 06-02-2005 04:18 PM
CUSTOMVALIDATOR works but page goes on on FALSE Jose Fernandez ASP .Net Web Controls 0 06-01-2005 10:05 PM



Advertisments