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

The Archive Base Latest Questions

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

Ok Simple : TextBox, RequiredFieldValidator, Button Without a Master Page – if the TextBox

  • 0

Ok Simple : TextBox, RequiredFieldValidator, Button
Without a Master Page – if the TextBox is empty – I get an Error Message when Clicking Button.
With a Master Page – if the TextBox is empty – I get NO Error Message when Clicking Button.

This happened recently without changing the code. Simply creating a DEFAULT Master Page and putting these three controls in it will result in NOT having an Error Message.

I am at a loss on how to fix this. It seems not code-related as a default Master Page stops the error message from showing up.

Should I reinstall Visual Studio 2010 Ultimate?
Browser Independent, Recent, Not Code Related AFAIK, just started happening recently.

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator
            ID="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
        <asp:Button ID="Button1"
            runat="server" Text="Button" onclick="Button1_Click" 
            ValidationGroup="RequiredFieldValidator1" />
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {

    }
}
  • 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:38:56+00:00Added an answer on June 11, 2026 at 6:38 pm

    I think you’re experiencing the problem because you have the validation group set for your button, however, it is not set for the TextBox and the Validator control itself.

    Try to assign the same ValidationGroup for all controls that are participating in your validation scenario. It seems that you have misused the

    ValidationGroup="RequiredFieldValidator1"
    

    Property. You don’t have to use the Id of the RequiredFieldValidator as your button’s ValidationGroup (you can, but you don’t have to). Please refer to the following article for more details:

    http://msdn.microsoft.com/en-us/library/ms227424%28v=vs.100%29.aspx

    Anyway, the

    ValidationGroup

    property has to be the same for all controls that belong to your validation scenario. In your case this is TextBox, Button and the Validator control.

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

Sidebar

Related Questions

I've got a simple WPF dialog with these two controls: <TextBox Text={Binding MyText}/> <Button
There's this very simple bit a code <asp:TextBox ID=txbVipNumber runat=server /> <asp:TextBoxWatermarkExtender ID=tbweVipNumber runat=server
I have a simple TextBox that is empty in the beginning. I have a
is it possible to get any information/text from JQuery Alert or a simple textbox
I've got a simple textbox on my asp.net page wrapped around an updatepanel: <asp:UpdatePanel
In ASP.net I have a simple textbox and radio button list with yes or
I found simple textbox watermark script that I was going to use in my
I'm trying to set together a simple TextBox with some watermark text in the
In my web application, I have users input a date in a simple textbox.
Is there a simple way to bind the textbox of a div to change

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.