locked
which is best RRS feed

  • Question

  • User-1805071546 posted

    I am using asp.net with vb.net. Which one is best Javascript or builtvalidations like requiredfield validator

    for some conditions validation summary is not working fine.then what to follow??????????

    Thanks in advance

     

    Thursday, August 21, 2008 9:07 AM

Answers

  • User-1773948845 posted

     

    I am using asp.net with vb.net. Which one is best Javascript or builtvalidations like requiredfield validator

    It depends on the situation of the page.

    For eg. if u want to client side activity u have to use javascript only

    Validation controls also depends on the "js" file. For eg. all the validation controls have there own "js" file.

    check this for a better idea

    http://aspnet.4guysfromrolla.com/articles/080906-1.aspx

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 23, 2008 8:05 AM

All replies

  • User-537655996 posted

    for RAD you must use the validation control provided by the .Net frame work but if u are in slow and javascript sometime will fails in someother browser

    Note : Validation control won't work inside an update panel for that you need to chekc the below link

    http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx

    Thursday, August 21, 2008 9:33 AM
  • User599352938 posted

    Hi,
    Javascript is best for validation. Because the validation part will be in your control.
    You can show the validation messages as alerts.

    Thursday, August 21, 2008 9:34 AM
  • User-125547262 posted

    I am using asp.net with vb.net. Which one is best Javascript or builtvalidations like requiredfield validator
    they are javascript based , but since you do not have to write any custom code, I would recommend using the built in validators where ever you can

    Thursday, August 21, 2008 9:37 AM
  • User-1805071546 posted

    hai thanks for ur reply, In some situations i am using javascript ,and for some i am using validation controls it is not looking nice, because in javascript we can give single msg in alert but in validation summary all combined together , It is not looking nice single msg alert and multiple msgs in alert together. in that cases what to follow.i hope i am explaining in the right manner.and for javascript we need to define functions manually.It is increasing the number of lines also.

    Friday, August 22, 2008 12:13 AM
  • User604186779 posted

     Hi

    best to use Validataion server controls

    in Case you didnt find the validation expression at that time go for Javascript.

     Are you got it..
      

    Friday, August 22, 2008 12:33 AM
  • User-1805071546 posted

    Thanks for ur quick reply venkat

    but if i use

    OnClientClick="return validate('save')"  this validation summary is not working that time what to use........

    Friday, August 22, 2008 12:39 AM
  • User-2125168801 posted

    i suggest javascript which you no need to worry about handling situtations... good to practice too..

    Friday, August 22, 2008 1:30 AM
  • User604186779 posted

     At that time you should javascript..

     

    Saturday, August 23, 2008 7:20 AM
  • User2063068624 posted

    It can be unsafe to rely purely on javascript to validate your data.

    Consider that the browser may have javascript disabled. 

    Saturday, August 23, 2008 7:52 AM
  • User-1773948845 posted

     

    I am using asp.net with vb.net. Which one is best Javascript or builtvalidations like requiredfield validator

    It depends on the situation of the page.

    For eg. if u want to client side activity u have to use javascript only

    Validation controls also depends on the "js" file. For eg. all the validation controls have there own "js" file.

    check this for a better idea

    http://aspnet.4guysfromrolla.com/articles/080906-1.aspx

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 23, 2008 8:05 AM