Solved

C# Code Behind Label Validation Event

Posted on 2014-09-26
2
243 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
the name DateAdd does not exist in this context 2 32
(code works) but print excel in Landscape 5 49
.NET Error 7 42
c# code 19 57
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now