Solved

C# Code Behind Label Validation Event

Posted on 2014-09-26
2
265 Views
Last Modified: 2014-10-02
I have a form that has a TextBox and DropDownList .    I need to validate that something is entered into the TextBox when "CONMX" is selected in the dropdown.    The TextBox ID is "Conmx" and the DropDown ID is CondBY,    

When "CONMX" is selected in the dropdown, Label1 should display on the Markup Page form if the user attempts to submit prior to entering something into the text box.
Back.docx
0
Comment
Question by:BOEING39
2 Comments
 
LVL 15

Accepted Solution

by:
Ess Kay earned 500 total points
ID: 40352485
add to ONCLICK for submit button
    inside code:

      if (CONMX.text.length = 0) then {

       label1.text = "text not entered"
     }else {
      ...submit...
     }
0
 

Author Closing Comment

by:BOEING39
ID: 40358154
That worked - thx
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question