Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8511983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:09:25+00:00 2026-06-11T04:09:25+00:00

I have one asp.net form. In it i have many fields which are required.

  • 0

I have one asp.net form.
In it i have many fields which are required.
I want to display validation summary of all fields at the end of the form.
I have already checked for valid values of input controls.
Now i only want is Summary.

Here is my code for valid data input

<script language="javascript" type="text/javascript">
        function userCheck(uName) {
            var uName = document.getElementById(uName);
            var letters = /^[A-Za-z0-9]+$/;
            if (uName.value.match(letters) && uName.value.length != 0) {
                uName.style.border = "2px solid #008A2E";
                return true;
            }
            else {
                uName.value = uName.value.replace(/[\W]/g, '');
                uName.style.border = "2px solid #ff0000";
                uName.focus();
                return false;
            }
        }
</script>

This is just one function for username check.
I have many more to deal with.
Is there any way to display summary from all fields at the last when submit button is pressed ?

below solution is not working.

 function ddlcheck(ddlclg) {
            var clg = document.getElementById(ddlclg.id);
            var clgname = document.getElementById('<%= LblCollegeName.ClientID %>');
            clgname.style.display = "block";
            clgname.innerHTML = "Selected College : " + clg.options[clg.selectedIndex].value;
            clg.style.border = "1px solid #008A2E";
            if (clg.options[clg.selectedIndex].value == "Select") {
                clgname.style.display = "none";
                clg.style.border = "1px solid #ff0000";
                validationhtml = validationhtml + "<b>*</b> College" + "</br>";
            }
        }

above code is for dropdownlist.

 function select() {
            var count = 0;
            var chkSelectAll = document.getElementById('<%= ChkSelectAll.ClientID %>');
            var chkList = document.getElementById('<%= chk.ClientID %>').getElementsByTagName("input");
            for (var i = 0; i < chkList.length; i++) {
                if (chkList[i].checked == true) {
                    count++;
                }
            }
            if (count == chkList.length)
                chkSelectAll.checked = true;
            else {
                chkSelectAll.checked = false;
            }
        }

above code is for selected check boxes.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T04:09:27+00:00Added an answer on June 11, 2026 at 4:09 am

    create a div ( errorreport) at required location validation summary give it style as you needed

    After that

    <script language="javascript" type="text/javascript">
        var validationhtml="";
        function userCheck(uName) {
            var uName = document.getElementById(uName);
            var letters = /^[A-Za-z0-9]+$/;
            if (uName.value.match(letters) && uName.value.length != 0) {
                uName.style.border = "2px solid #008A2E";
                return true;
            } else {
                uName.value = uName.value.replace(/[\W]/g, '');
                uName.style.border = "2px solid #ff0000";
                uName.focus();
                validationhtml=validationhtml +"uname is not correct" ;
                return false;
            }
        }
    
        function validationsummary() {
    
            // if using jquery
            $(".errorreport").html(validationhtml); 
    
            //for javascript
            document.getelementbyid("errorreport").innerHTML = validationhtml; 
    
            if(validationhtml == "") {
                return true;
            } else {
                return false;
            }
        }
    </script>
    

    and call validationsummary() on submit button click

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a complex asp.net form,having even 50 to 60 fields in one form
I have an ASP.NET form with three text inputs, one each for Work Phone,
I am using Asp.net dropdownlist in one of my form ..I have two dropdown
i need to have one project on asp.net mvc 1 but i want to
Here's the problem I'm having in my ASP.NET web-form project. I have Datalist which
We have around 100 dropdowns in one ASP.net form. When we hit tab it
I have one Asp.net MVC3 page which renders details of a Mobile. This page
I have migrated one ASP.NET v4.0 application to a new server running under a
I have one group of 3 asp.net textboxes and one group of 2 asp.net
I have one question; In my ASP.NET MVC web application have to do certain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.