Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Problem with required field validator.

Nikhil VaghelaNikhil Vaghela Posts: 24Member
hello,

I have one page in which submit and reset buttons are there and there are some fields which are required to be filled.Reset is my html input control in which i have retun on onclick "document.Form1.Reset()" .

Now my problem is when i click on submit withouth entering required data the validator message will be displayed but on click o Reset only textbox becomes empty but RFV messages remains still there.How to avoid/remove that ????

thanks,
NIKHIL.

Comments

  • Xtreme.NETXtreme.NET Posts: 112Member
    I didnt try it, but just a suggestion, have you tried to disable the validators? or set validate = false for them on reset? or something?
    R. Thomas

    [size=1][COLOR=blue]"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."[i]1Thess. 5:16-18[/i][/color][/size]

  • Nikhil VaghelaNikhil Vaghela Posts: 24Member
    : I didnt try it, but just a suggestion, have you tried to disable the validators? or set validate = false for them on reset? or something?
    : R. Thomas
    :
    : [size=1][COLOR=blue]"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."[i]1Thess. 5:16-18[/i][/color][/size]
    :
    :
    well thanks for ur suggestion,
    Ya i tried that.In javascript i took Page_Validators array which will be generated by asp.net but disabling rather making its visible false will not solve the problem because when another servers side controls left empty its validation will fire and at that time that will be invisible.So to make it visible again we need to write javascript and i am having one grid in which edit template is there and we cant handle it in javascript..hope u got my problem ?
  • dingseadingsea Posts: 6Member
    try ReLoad Methrod?



  • MehanathenMehanathen Posts: 13Member
    on the click event of Reset button set the visibility of RFV as false or set the Display type property of the RFV as Dynamic
  • prawin_dssprawin_dss Posts: 4Member


    hi..

    try out this... in a java script function and call that function in reset button click event as



    function fun1()
    {
    document.Form1.reset();
    document.all["ValidationSummary1"].style.display='none';
    }







    : hello,
    :
    : I have one page in which submit and reset buttons are there and there are some fields which are required to be filled.Reset is my html input control in which i have retun on onclick "document.Form1.Reset()" .
    :
    : Now my problem is when i click on submit withouth entering required data the validator message will be displayed but on click o Reset only textbox becomes empty but RFV messages remains still there.How to avoid/remove that ????
    :
    : thanks,
    : NIKHIL.
    :







  • Ash-merAsh-mer Posts: 1Member
    Use the property of the asp button CausesValidation="false"
Sign In or Register to comment.