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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:59:58+00:00 2026-06-16T19:59:58+00:00

The controls in the ASP.NET <asp:TextBox ID=txtEnd runat=server placeholder=12:59></asp:TextBox> <asp:RadioButtonList ID=rblTime2 runat=server RepeatDirection=Horizontal RepeatLayout=Flow>

  • 0

The controls in the ASP.NET

<asp:TextBox ID="txtEnd" runat="server" placeholder="12:59"></asp:TextBox>
<asp:RadioButtonList ID="rblTime2" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
    <asp:ListItem>AM</asp:ListItem>
    <asp:ListItem>PM</asp:ListItem>
</asp:RadioButtonList>

CustomValidator

<asp:CustomValidator ID="ValidateStartTime" ControlToValidate="txtEnd" OnServerValidate="ValidateStartTimeFun" runat="server" ErrorMessage="*required"></asp:CustomValidator>

CodeBehind

protected void ValidateStartTimeFun(object source, ServerValidateEventArgs args)
{
    try
    {   if (txtStart.Text != "" && rblTime.SelectedValue != null )
        { args.IsValid = true; }}
    catch (Exception ex)
        { args.IsValid = false; }
}

It doesn’t even give me a *required if I change the entire CodeBehind to this;

protected void ValidateStartTimeFun(object source, ServerValidateEventArgs args)
{
    args.isValid = false;
}
  • 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-16T19:59:59+00:00Added an answer on June 16, 2026 at 7:59 pm

    If you’re validating empty input, custom validators don’t fire if you set the ControlToValidate property AND don’t set the ValidateEmptyText property to true, otherwise the framework expects you to use a RequiredFieldValidator.

    http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.customvalidator.validateemptytext.aspx

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

Sidebar

Related Questions

ASP.NET server controls has a few categories, for example, normal ones e.g. TextBox, Button
I am trying to use ASP.NET Server Controls (ASP.TextBox etc) with MVC (to take
Is there any way to use server controls in ASP.NET MVC? Specifically I need
I am creating ASP.NET textbox controls dynamically. I want to know the difference between
I have an asp.net web form with a couple of asp.net textbox controls: <asp:TextBox
I am using ASP.NET 2.0. I have various ASP.NET Server Controls like TextBoxes on
I'm wondering if anyone knows what are the valid Asp.Net server controls that can
I am using jQuery .blur on ASP.NET's Textbox controls. My jQuery code is as
I have for example ASP.NET site with textbox, button and many other controls. When
i have textbox controls that are created dynamically in the ASP.NET. I want to

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.