Validation controls displayed over other controls

Does anyone know of away to display a validation control on top of a dropdownlist?

Or any other ideas on how to display an error message on top of a dropdownlist.

I'm a novice at this so please don't get too deep in programming.

11/20/2006 7:32:32 PM 24353 articles. 1 followers. Follow

7 Replies

Similar Articles

[PageSpeed] 1


first of all, most people are used to see validation controls, being it either in a web application or a winforms application, right of the control that needs attention.

Being said that you could use the z-index of CSS to display a <span> or <div> tag above your control and put the validation control inside that html tag that you display above your control. I would like to point out that you first learn CSS before doing stuff like this:

Grz, Kris.

Read my blog. Handy Firefox plugins for web developers.

Workaround for non working Mark as answer buttons.
11/20/2006 7:43:55 PM
For on top, do you mean overlapping or just on the same table? If so you can use RequiereFieldValidation classes. The controls are on your toolbox.
My Blog
Please click on 'Mark as Answer' if this post answered your question!
11/20/2006 7:47:01 PM
Yes, I agree with the placement and I just learned of z-index but I admit I have not yet learned about CSS. I guess I'll back to school for a while. Thanks for the link.
11/20/2006 8:08:15 PM
Yes I mean overlapping. I am using RequiereFieldValidation.
11/20/2006 9:27:39 PM

OK, I've tried what you suggested but I can't get it to work. Here is a simple test page of what I am trying to do.


@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>


DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">


html xmlns="" >


head runat="server">

<title>Untitled Page</title>





<form id="form1" runat="server">

<div style="z-index: -1">

<asp:DropDownList ID="DropDownList1" runat="server" Style="z-index: 100; left: 350px;

position: absolute; top: 75px"




<div style="z-index: 900">

<asp:TextBox ID="TextBox1" runat="server" Style="z-index: 101; left: 120px; position: absolute;

top: 75px"></


<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"

ErrorMessage="RequiredFieldValidator" Style="z-index: 102; left: 285px; position: absolute;

top: 75px"


<asp:Button ID="Button1" runat="server" Style="z-index: 104; left: 165px; position: absolute;

top: 140px"

Text="Button" ValidationGroup="val1" />







11/20/2006 9:58:53 PM
Internet Explorer 6 has a limitation that prevents ANY absolutely positioned element from appearing above a DropDownList or ListBox (<select> tag). There is an interesting hack to work around it. (See But I recommend that you try to avoid that and find a different solution (as if a hack doesn't exist.)
--- Peter Blum
Creator of Peter's Data Entry Suite (formerly Professional Validation And More and Peter's Date Package) and Peter's Polling Package
11/21/2006 7:02:31 PM

Your right PLBlum, the hack doesn't look very promising. But at least I know why now, thanks.

What about the AJAX ValidatorCalloutExtender, do you know if this might work? I know it's buggy.

11/21/2006 8:22:35 PM

Similar Artilces:

Validation Controls in .NET ( Client side or server side?)
 i have a very basic question. We have all these validation controls in ( required field, range validator and others) question is the required field validator is a server side control. So does that mean that it does a post back? it client side or server side control  The only controls that post back are buttons and other inputs where you set AutoPostback="True", such as a dropdownlist or a textbox.  Another way of posting back is using an UpdatePanel and placing a trigger in it for a specified control and/or event. All controls are considered clien...

Hello, I've come across the problem when I wanted to use client side validation (no matter of which type) depending on the input from a different control. The scenario is: I have two textboxes A and B. A does not need to be validated (no validator associated with A). The textbox B has to be validated if and only if the A has any value. I know this is trivial with custom validator in the server side mode... But unfortunately I want it to run the validation on the client side. And I also know that I can write a javascript function for the ClientValidationFunction and hardcode client id ...

How to display all of my validation controls in my Validation summary control?
I have a  validation summary control I am using on a web form to validate various controls on a web form. For one of the controls  which is a text box control, I have a custom validation control. When someone presses the save button, all of the controls are validated. If any errors occur, then the error message is displayed in the validation summary area above all of the controls. This is what I want. The problem though is that I also get an error message next to my text box which was assigned the custom validator control. The problem here is that the error message i...

validation, is it better to have client side or use server side validator controls
 Hi All. I want to do validation on text boxes etc. Is it better to do client side validation or just use the server side validation controls?   Hi!  If for server side controls you mean RequiredFieldValidator, CompareValidator, RegularExpressionValidator, etc.. i can tell you that they use client and server validation. For instance if you use a RequiredFieldValidator, on the client will be a validation, but on the server this condition will be evaluated again. Probably one of the objetives of this is deal with client with javascript disabled. Of course I ...

Combining a server-side control with a client-side control!
Hi all, I am trying to combine a server-side control with a client-side control. I have created a listbox in both sides, the client-side control's code is: <select size="4" name="lstFruit" id="Select1" ondblclick="lst_dblClick" visible="false"> <option value="Banana">Banana</option> <option value="Apple">Apple</option> <option value="Mango">Mango</option> <option value="Orange">Orange</option> </select> The other one is the server-side control which has this code:   I wanted to add the ondblClick attribute to the se...

What are diff Server-side control and Client-side control ?
What are diff Server-side control and Client-side control ? and diff server -side coding and client -side coding ? please help I have answered the first part of your question in your previous posting. Server-side coding languages are ASP, ASP.NET, PHP, CGI (Perl) and many, many more. They are used to create dynamic web content (based on additional information that is attached to the request) and are often used to extract information from databases. Client-side coding languages are JavaScript, VBScript, EMACScript and are used to create dynamic content that responds to the u...

validation controls
Hi all,I have a web form with a few controls and reqdfield, compare & regex validation controls. On all validation controls i have enabled the client script property. Yet when I submit the form it does a postback to do the validation. Any ideas? I am running vs2005 beta 2.TIA! do these validators perform the validation of the other controlos? whar browser are you using?-- Regards,Luis Abreuemail: labreu_at_gmail.comEN blog: Well they are regular requiredfield, regex & compare validators. Browser is latest version of Firefox. I had to use...

Controlling the controls a validator validates
Hello, I want to control which controls appear for a validator when they go to controltovalidate dropdown in property grid.  Is the solution to create a designer for the control?  How do you regulate that?  I can't override the ControlToValidate property... Thanks.Brian"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4). Well ur logic is true, thats the way, what u need to do is not override the property (cant), create another property, that implemen...

Client Side Validation For Custom Controls / Validators
Hi there people, I'm creating my own set of self validating text boxes. They all inherit from a base text box which simply contains a required field validator, they then usuallly implement another validator to check they contain number, currencies, dates or whatever. The problem i'm having is with the DateTextBox, I have created my own Date Validator which inherits from the BaseValidator class which the DateTextBox uses. My problem is that no validation is taking place on the client side. I've included the code for all related parts, if you need anymore info then please just let me k...

Is there a correspondance for each server side control to be equivalent to a client side html control
Where can find the list and can use that equivalence and what is its usage plsThanksThanks a lot, I appreciate your taking the time to help me. What exactly do you mean? A correspondence of what?All controls have a ClientID property, which for most controls tells the DOM element ID that will be used in the HTML rendering. Aside from that certain controls might offer additional client-side functionality, but there's no one standard.Thanks,EilonBlog: I mean. When I am using html control in my aspx page like:  <input type=text ..>  and...

Client side validation using validation controls
I have a form which comprises of several form inputs, which are being validated using standard requiredfield & regular expression validators. A summary control is placed to display all server side error messages and is also set to showMessage = true for client side prompting. My requirement is to display all error messages on sumbit within the pop-up (summary) in addition to being displayed on the page (showSummary = true), when JavaScript is disabled the summary control will display all errors server side, which is fine... Now I get to the tricky bit, I include a custom validatio...

custom validation control client side validation did not work
<head runat="server"><script language=JavaScript >  function vrNameLenght( sender, args){  if (args.Value.Length > 15) args.IsValid = false; elseargs.IsValid = true;   }  </script> </head> <form id="form1" runat="server">                  <asp:ValidationSummary ID="ValidationSummary1" runat="server" />        <table align =center  width=750  &...

Using Validation COntrols, client-side validation ignored
Hi, I have a simple ASP.NET 1.1 app with some text boxes. I have used RequiredFieldValidator controls and they work fine on localhost. That is, there is no posting to the server if a field is empty. However, if I upload the app to my hosting service (WebHost4Life), the client-side behavior does not take place and the page is posted to the web server (were the expected server-side validation takes place). Any idea why this might be happening (the hosting service does have the appropriate js that should be being used client-side for the validation.) bill b Bill, does your Web.config fi...

Validation Controls Client Script Conflict
I had a web form set up using 2 validation controls, with the client script working just dandy. When a user tabbed out of an empty field that was required or hit the submit button the form was not posted back and a nice label popped up with a helpful message.When I installed atlas in my web application the client side validation functionality stopped working on my form. Regardless of what was in the form fields the form was posted back to the server when the submit button was clicked and nothing at all happens when required fields are tabbed out of when empty.Is it possible I have my...

Web resources about - Validation controls displayed over other controls -

Cross-validation (statistics) - Wikipedia, the free encyclopedia
is a model validation technique for assessing how the results of a statistical analysis will generalize to an independent data set. It is mainly ...

Serena Williams eyes history, Caroline Wozniacki craves validation in women's US Open final
As Serena Williams eyes another slice of tennis history, Caroline Wozniacki is craving validation with a watershed US Open final triumph on Sunday ...

Travers Duncan asks High Court to strike down ICAC validation laws
ICAC could be sent back to the High Court as a challenge to new laws validating corruption findings looms.

Adam Scott proclaims Texas win as validation of No.1 ranking
... No.1 golfer, beating American Jason Dufner in the third hole of a play-off at the Colonial event. "It's a good feeling and maybe some validation ...

Hollande to sign gay marriage bill after Constitutional Council's validation
Hollande to sign gay marriage bill after Constitutional Council's validation People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, ...

Marketers, Get Ready for the 'Validation Era'
The public brands included has been engaging in a "friends" arms race. But there are signs that we know we overdid it.

Validation and Uncertainty
What an extraordinary conversation I had recently on Twitter. It started with Neil Killick’s statement that we should not consider our stories ...

Nvidia Icera 410 LTE Modem Passes AT&T Network Validation
... Today's news is a small step and logical precursor toward both goals, Nvidia's Icera 410 LTE and HSPA+ baseband has passed AT&T's network validation ...

Ting’s Q1 Subscriber Growth Suffers from Sprint’s New Unlocking Validation Process
Back in February, Sprint updated the process it uses to validate unlocked devices that customers want to utilize on other carriers or one of ...

[Android M Feature Spotlight] Stricter APK Validation Now Actually Checks If All Of An APK's Files Are ...
While you might file this one under "really? We weren't doing this already?" if you're a security expert, Google has added stricter validation ...

Resources last updated: 11/27/2015 12:56:42 AM