Color of Validation Text

by | 10 Apr 2013

You may have noticed that the color of the validation text is black in framework 4.0. To make it red again I found the following solution but some users say that it doesn’t work always.

<?xml version=”1.0″?>

<configuration>

<system.web>

<compilation debug=”false” targetFramework=”4.0” />

<pages controlRenderingCompatibilityVersion=”3.5″ />

</system.web>

</configuration>

Therefore, I was looking for a different solution and I found it; I am adding the followings in my skin file and they work fine for me

<asp:RangeValidator runat=“server” ForeColor= “Red” />

<asp:CustomValidator runat=“server” ForeColor= “Red” />

<asp:RequiredFieldValidator runat=“server” ForeColor= “Red” />

<asp:CompareValidator runat=“server” ForeColor= “Red” />

<asp:RegularExpressionValidator runat=“server” ForeColor= “Red” />

<asp:ValidationSummary runat=“server” ForeColor= “Red” />

Also, you can create a class in CSS style sheet and use that in every validation control but I liked the skin file solution better because you just write once and you are done; simple…

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

Other Posts

Amazing

Recently, I had an opportunity to work with a vision impaired employee of our agency. I was amazed by his ability to work almost at the same speed and accuracy of a sighted person. Of course he uses a special software in his computer but he mastered the skills of...

National Pride vs. People’s Lives

More lives could have been saved but the Bangladeshi government reportedly refused to take assistance from some friendly countries in rescuing garment workers from collapsed “Rana Plaza” because of national pride. I am not sure where is the pride coming from. Other...

মানুষের মন

বাবার আমেরিকাতে থাকার সুবাদে জানতাম একদিন আমিও আমেরিকাতে আসব। আর আসার কিছুদিন পূর্ব থেকেই স্বপ্ন দেখতে শুরু করি। স্বপ্নগুলো ছিল এমন যে – আমি লিফটে করে অনেক উঁচু বিল্ডিংএ উঠে যাচ্ছি। ইউএসএ আসার পরে অমন অনেক উঁচু বিল্ডিংএ উঠেছি। এমনকি চাকরির সুবাদে ট্রেনিয়ের জন্য যখন...

Social media

I have some friends who don’t like Facebook or twitter (may be they even hate it). I told them to join several times but they avoided by giving many excuses. I think social media makes communication easier. I only have their phone numbers but sometimes I don’t want to...

Testicular Cancer

Recently, I took a agency mandated class on communication. It was a good class and the lessons learned there can be used for effective communication in work or in personal life. The instructor shared some experiences involving his client, parents, and siblings. He...

My Ordinary Life

In my personal life there is everything present for me to be happy. I am happy somewhat but I don’t feel satisfied. My existence doesn’t mean much outside of my family. If I die today I will be forgotten very fast. This world will not miss anything because of my...

The Curious Case of Children’s Motrin Costs

I recently needed to purchase Children’s Motrin, which I had bought from Walmart a few days ago for $7.68. However, since Walmart is a bit far from my location, I decided to compare prices online at Rite Aid and CVS. To my surprise, Rite Aid listed it for $8.79, while...