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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:02:50+00:00 2026-06-13T03:02:50+00:00

I have a webform with a textbox and 3 buttons (add, save and cancel),

  • 0

I have a webform with a textbox and 3 buttons (add, save and cancel), I’m learning how to use customvalidators (ASP.NET 4.0).

Once the page is loaded, you can only see the add button, after you click on it you can see the textbox and the other 2 buttons.

If textbox is empty I can’t save the record (I get this done successfully with customvalidator and javascript, it shows me the error message “textbox can not be left empty”), but what happens if I don’t want to save the record anymore and want to cancel instead (by clicking on the cancel button while textbox is still empty)?

I get the customvalidator error “textbox can not be left empty”. I have to type something i it so I can do what i need.

Any suggestions?
Thanks in advance

  • 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-13T03:02:54+00:00Added an answer on June 13, 2026 at 3:02 am

    For Cancel button set the attribute CausesValidation=”false”. That is it…

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

Sidebar

Related Questions

I have an ASP.NET page (WebForm) on which I set the content of a
I have a simple Asp.NET webform with a TextBox. I have attached an AjaxControlToolkit
On my C# asp.net webform I have a search page that has roughly 20
I have a ASP.NET webform that, aside from other controls, has a textbox for
If I have the following in an ASP.NET Web Form: <asp:TextBox runat=server ID=tbxUser/> and
I have a simple ASP.NET MVC 3 dummy app (just learning MVC coming from
Within an asp.net webform I have some jquery that controls the positioning of elements
I have a standard asp.net webform with multiple textboxes (Autopostback=False) on it and a
I have a simple ASP.NET web form as below: <form id=form1 runat=server> <asp:TextBox ID=txt
I have an ASP.net WebForms page that has a lot of content on the

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.