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

Analyze That

On the day of my baby boy’s birthday (last Sunday) we were eating pizzas. At one point my mother was telling me not to eat pepperoncinis that come with papa john’s pizzas because she thought it would give me gas. I ignored and ate two anyways since I never got problem...

Windows Phone Emulator

Recently, I started to learn about creating applications for windows phone. However, every time I tried to run my application I started to get the following message: Clicking “Retry” worked but it was annoying, so I looked for a permanent solution. I found it and the...

Empathy!

On 03 November 2018 I was coming to USA from Bangladesh and I got sick in the plane. When we landed at Shannon Airport, County Clare, Ireland I started shaking in the queue to final checking before flying to JFK airport, New York, USA. I was shaking because my fever...

মানুষের মন

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

দলাদলি

দলাদলি এবং বিভক্তি নিয়ে বাংলাদেশী বা মুসলমানদের সম্পর্কে যা বলা হয় তা মনে হয় সত্যি নয় কারন এক ইহুদী লোকের কাছ থেকে আমি এই কৌতুকটা শুনেছি – দুই ইহুদী এক হলে নাকি তিন দল করে। দুইজন আলাদা আলাদাভাবে দুই দল এবং দুইজন একত্রে আর এক দল...

Family Vacation 2022

We (my parents, two brothers with their families and I with my family) went on a family vacation in upstate (Peck’s Lake) NY this year. My only sister and her family live a few thousand miles away from us, so she couldn’t join us this year. The vacation house was...

Eid Mubarak

Eid-ul-Ajha is a two-and-a-half-day celebration. Today is the first day and this morning, we went to pray at our local Northeast Philadelphia Islamic Center. We attended the first jamat at 8:00am. The main Eid prayer took place in the front yard of the mosque, but we...