locked
ValidationGroup for Jquery RRS feed

  • Question

  • User1052662409 posted

    Hello All,

    Earlier when I used to work on asp.net web forms there was a validation group policy for the controls. You just give any name to a group of controls to (ValidationGroup="somename") to validate te controls.

    Now I am using Html controls but here the validation group doesn't work anymore. like below

    <div class="form-group col-md-3">
                                <label for="">Document</label>
                                <asp:FileUpload ID="FUFile" runat="server" CssClass="form-control form-control-sm" alidationgroup="group1"  required   />
                            </div>
    
    
    
                            <div class="form-group col-md-2" style="margin: 15px;">
                                <label for="btnUpload">&nbsp;</label>
                                <input type="submit" class="btn btn-primary" runat="server" id="btnUpload1"  validationgroup="group1" value="Upload" />
                            </div>
    						
    						
    						<div class="form-group col-md-3">
                                <label for="">Document</label>
                                <asp:FileUpload ID="FUFile" runat="server" CssClass="form-control form-control-sm" alidationgroup="group2"  required   />
                            </div>
    
    
    
                            <div class="form-group col-md-2" style="margin: 15px;">
                                <label for="btnUpload">&nbsp;</label>
                                <input type="submit" class="btn btn-primary" runat="server" id="btnUpload2"  validationgroup="group2" value="Upload" />
                            </div>
    
    

    Do I need to make a customized validation group for that?

    Please suggest

    Saturday, April 11, 2020 11:59 AM

Answers

  • User475983607 posted

    Now I am using Html controls but here the validation group doesn't work anymore. like below

    Correct.  You need to use server controls in Web Forms.

    Do I need to make a customized validation group for that?

    Yes, you need to write custom code if you do not wish to use the framework tools.  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, April 11, 2020 12:58 PM