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 8571071
In Process

The Archive Base Latest Questions

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

i have register form in asp, it has 30 input box that all of

  • 0

i have register form in asp, it has 30 input box that all of them have RequiredFieldValidator
. when user click on submit how can i found out that at least one of input is not filled and show error next to the submit button and input control?

<fieldset>
        <legend>title :</legend>
        <asp:Table ID="Table3" runat="server">
            <asp:TableRow runat="server">
                <asp:TableCell runat="server"> :</asp:TableCell>
                <asp:TableCell runat="server">
                    <asp:TextBox ID="txtMadrakTahsili" runat="server" CssClass="Width"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" 
            ErrorMessage="*" Display="Dynamic" ControlToValidate="txtMadrakTahsili"></asp:RequiredFieldValidator>
                    </asp:TableCell>
                <asp:TableCell runat="server">reshte :</asp:TableCell>
                <asp:TableCell runat="server">
                    <asp:TextBox ID="txtReshteTahsili" runat="server" CssClass="Width"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator25" runat="server" 
            ErrorMessage="*" Display="Dynamic" ControlToValidate="txtReshteTahsili"></asp:RequiredFieldValidator></asp:TableCell>
                <asp:TableCell ID="TableCell7" runat="server">mahale akhz :</asp:TableCell>
                <asp:TableCell ID="TableCell8" runat="server">
                    <asp:TextBox ID="txtMahalAkhzMadrak" runat="server" CssClass="Width"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" 
            ErrorMessage="*" Display="Dynamic" ControlToValidate="txtMahalAkhzMadrak"></asp:RequiredFieldValidator></asp:TableCell>
            </asp:TableRow>
            <asp:TableRow runat="server">
                <asp:TableCell runat="server">avg</asp:TableCell>
                <asp:TableCell runat="server">
                    <asp:TextBox ID="txtMoadel" runat="server" CssClass="Width"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server" 
            ErrorMessage="*" Display="Dynamic" ControlToValidate="txtMoadel"></asp:RequiredFieldValidator></asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </fieldset>

if one og inpuut is not filled , show error next to this button to !

<p style="float:left; clear:both;">
        <asp:Button ID="Button1" runat="server" Text="ثبت اطلاعات" Height="54px" 
            style="margin-right: 0" Width="119px" onclick="Button1_Click" /></p>
  • 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-11T18:42:10+00:00Added an answer on June 11, 2026 at 6:42 pm
    <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" 
        ErrorMessage="The textbox is empty" Text="*" 
    Display="Dynamic" ControlToValidate="txtMadrakTahsili">
    

    When you use Text="*" it will be shown next to Textbox if you placed it near the Textbox.

    The ErrorMessage property is useful when you want to show all validation errors together.

    So if you want to show Error Messages associated with the Textboxes then I suggest you use ASP.NET ValidationSummary control

    Validation Summary Control

    EXAMPLE:

    <asp:ValidationSummary ID="ValidationErrors" runat="server"
    DisplayMode="BulletList" HeaderText="There are some errors on the page./> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this website (C#/ASP.NET) with a form where the user can register for
I have a form, where user can register their personal information for a club,and
i have an AccountController that does the asp.net login and user registration. (Register action
I made register form where you have to put in all your personal info.
I have a form where my users can register to my site. They fill
I have a user registration Form. If a new User register their account in
In my web application i have registration form, when user register i want to
We have an old asp.net application that has no unit tests, integration tests, component
I have an asp.net form with a login section and a register section. There
I have an ASP.NET GridView which has columns that look like this: | Foo

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.