473,387 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Control the position of a CustomValidator

Hello.

How can I control the position of customValidator.

I have code like this (ASP.NET)
<asp:CustomValidator dir = "rtl" CHARSET=WINDOWS-1255"
id = "email_err"
ControlToValidate="a_email"
OnServerValidate="checkEmail"
Text="..."
ErrorMessage="..."
runat="server" />

in CSS I have declared :

#email_err
{
position: absolute;
top:290px;
left:230px;
width:220px;
visibility:visible;
font-size:16pt;
font-weight:bold;
color:red;
}

But, I see that the customValidator's position is not at the position of
CSS.

I want a sample for that, please.

Thanks :)
Sep 22 '08 #1
2 2174
On Sep 22, 2:58*pm, "Mr. X." <no_spam_please@nospam_please.comwrote:
Hello.

How can I control the position of customValidator.

I have code like this (ASP.NET)
<asp:CustomValidator dir = "rtl" CHARSET=WINDOWS-1255"
* id = "email_err"
* ControlToValidate="a_email"
* OnServerValidate="checkEmail"
* Text="..."
* ErrorMessage="..."
runat="server" />

in CSS I have declared :

#email_err
{
* position: absolute;
* top:290px;
* left:230px;
* width:220px;
* visibility:visible;
* font-size:16pt;
* font-weight:bold;
* color:red;

}

But, I see that the customValidator's position is not at the position of
CSS.

I want a sample for that, please.

Thanks :)
The client id of the custom validator is most likely not "email_err".
The ids of server controls are determined not only by their id, but by
all of their parent's ids. "View Source" on your page to see the
actual id. However, a better solution is to just use a css class
instead of id. Try this:

I have code like this (ASP.NET)
<asp:CustomValidator dir = "rtl" CHARSET=WINDOWS-1255"
id = "email_err"
ControlToValidate="a_email"
OnServerValidate="checkEmail"
Text="..."
ErrorMessage="..."
CssClass="email_err"
runat="server" />

in CSS I have declared :

..email_err
{
position: absolute;
top:290px;
left:230px;
width:220px;
visibility:visible;
font-size:16pt;
font-weight:bold;
color:red;

}
Sep 22 '08 #2
Thank you very much.

:o)
Sep 23 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Philip Korolev | last post by:
Hi All. What I am trying to do is use customValidator to go to a database via a stored procedure and fish out a UserName value. If it finds it, I want it to return 1 and if not I want it to return...
1
by: Jim Heavey | last post by:
Hello, I was am wanting to validate that a user has made a selection from a dropdownlist control in a datagrid. Is my only option to use a "CustomValidator Control"? I am not quite sure how to...
1
by: philipl | last post by:
hi, i have a datagrid which display custom controls when user clicks edit, changing data. I am using customvalidator to validate this control. I can get validation of user input to work no...
4
by: owingruters | last post by:
Hi all, I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster. The control wordks great if autopostback is on....
1
by: Dan Sikorsky | last post by:
I'm getting the following message when I try to add a CustomValidator control to the ValidationSummary to display an error message at runtime, and displaying ex.message in AddValidationControl...
1
by: avp | last post by:
Hi, We have an ASP.NET 2.0 (C#) application that has a web form with a CheckBoxList control and a CustomValidator control. The CustomValidator control is used to validate that at least one...
4
by: TS | last post by:
I am creating a User control and i create some dynamic controls in the init handler. one of the controls is a custom validator which i assign a serverValidate event handler. I usally always do my...
0
by: webmaster | last post by:
I've been playing around with asp.net 2.0/vs.net 2005/C# 2005 - I had a few noob questions. 1. Is there a setting that sets all current and future controls on a page to position absolutely...
1
by: settyv | last post by:
Hi, I need to use customvalidator control for calculating datedifference and need to alert if fromdate is greater than todate.Please let me know how can i do that using this control in asp.net....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.