Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to remove the border of a dropdownlist. That is, it should look like a label. Give me one solution. Also mention, how can i revert this chage.
Posted

Hi,

You can use a css style like {border:0px}...quite enough to remove the border.


revert for any clarification.

Happy coding :)
 
Share this answer
 
v2
Comments
Linto Leo Tom 30-May-12 8:10am    
Hi Sunny,

I want to use this in the code behind. So how can i do that?
Sunny_Kumar_ 30-May-12 8:15am    
Hi Member 9026726,
I'm sorry but I didn't get you clearly. You have to remove the DropDownList "border" from code behind or else ?
Sunny_Kumar_ 30-May-12 8:17am    
If you have to remove the border from code behind then you can use "ddl.BorderStyle = BorderStyle.None;" :)
Linto Leo Tom 30-May-12 8:23am    
I tried this. But still not working...
Sunny_Kumar_ 30-May-12 8:30am    
please share the code.
This link may help you
http://asp-net-example.blogspot.in/2009/03/how-to-set-change-dropdownlist-border_14.html</a>[^]

And you can put like this to remove border
C#
DropDownList1.BorderStyle = BorderStyle.None;


And revert back like this
C#
DropDownList1.BorderStyle = BorderStyle.NotSet;
 
Share this answer
 
Comments
Linto Leo Tom 30-May-12 8:23am    
I tried this. But still not working...
akee seth 30-May-12 9:44am    
I have tried this and its working for me.Please share the code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900