Solved

C# Code Behind Label Validation Event

Posted on 2014-09-26
2
285 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

719 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