Wrox Programmer Forums
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional 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 November 29th, 2007, 02:09 AM
Authorized User
Join Date: Jul 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem in dropdownlist

Posted - 11/29/2007 : 06:00:50 AM Report Abuse


   I want to have a dropdownlist with fixed width(in a web form using asp.net 2.0 and c#) and when
I click the dropdownlist, I should get its value like example

          | dropdownlist |
          |Hear is god. |
          |Work and worship. |
          |Life is beautiful. |
          |Enjoy every moment of the life. |

How to achieve this by using only dropdownlist.
Is there any property in dropdownlist to achieve the above.
Please give your valuable suggestion.

Old November 29th, 2007, 02:32 AM
Friend of Wrox
Join Date: Aug 2006
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts

man I don't get your question! do you mean other than the Width property or wut!

Nothing is impossible. The impossible only takes longer. "Digital Fortress, Dan Brown"
Old November 29th, 2007, 10:01 AM
Wrox Author
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

What I think he wants is so that the rendered control might be 50px but when he clicks on the arrow to show the list of the DDL, the list itself might be 100px.

In any event, if you set the width of the DDL to 50px the list that pops up will also only be 50px. There might be some CSS magic that you can do so that the dropdown control and the list itself are displayed with different width's, but I doubt it.

From a useability standpoint this is a horrible idea because if you select, say, "Enjoy every moment of the life" from your list, your ddl will only display "Enjoy every mome" as the selected item. This can become confusing.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dropdownlist Problem monika.vasvani ASP.NET 1.0 and 1.1 Professional 2 November 11th, 2006 09:24 AM
DropDownList Problem cmw231 ASP.NET 2.0 Professional 0 July 14th, 2006 08:44 AM
Problem with dropdownlist somnath.kartic ASP.NET 1.0 and 1.1 Basics 3 February 8th, 2006 01:59 AM
dropdownlist problem naresh.net ASP.NET 1.0 and 1.1 Basics 4 July 7th, 2005 01:22 AM

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