Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 27th, 2004, 04:02 AM
Authorized User
 
Join Date: Feb 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mahulda
Default Different colors for listitems of radiobuttonlist

Hi,

Consider the following where rb is a radiobuttonlist control
rb.items.add("A")
rb.items.add("B")
rb.items.add("C")
rb.items.add("D")

Through the four lines I add four Items to the listt in differenr colors.
The Page Loads perfectly with the listitems in their specified colors.

But when I submit the Page It generates an error

A potentially dangerous Request.Form value was detected from the client (rb="

Please can anybody suggest me some way out of this problem .
Or any other better method to get the listitems of the Radiobuttonlist to appear in different colors.

-.. -..
__________________
-.. -..
 
Old August 27th, 2004, 08:08 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Try setting ValidateRequest="False" in the @ Page directive so that ASP.net doesn't check the querystring/form inputs for "dangerous" values.



 
Old August 27th, 2004, 08:17 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

That is because it is taking the value also as "A"
Create an ListItem and give text as "A"
and Value as "A"
This will work fine..






Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with color of listitems when postback hertendreef ASP.NET 2.0 Professional 6 March 9th, 2008 11:00 AM
RadioButtonList sumith ASP.NET 2.0 Basics 0 October 2nd, 2007 11:30 PM
radiobuttonlist + textbox Bartdude ASP.NET 1.0 and 1.1 Basics 2 December 5th, 2006 10:38 AM
Problem with Radiobuttonlist liorlankri ASP.NET 1.x and 2.0 Application Design 1 December 10th, 2004 12:45 PM
radiobuttonlist fzilz VS.NET 2002/2003 1 April 9th, 2004 10:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.