all groups > dotnet general > april 2005 >
You're in the

dotnet general

group:

Setting the current value in a DropDownList


Setting the current value in a DropDownList BillG
4/30/2005 11:34:04 PM
dotnet general: How do I set the current value in a DropDownList? I populate the DDL and
then I want to position it to the current value.
Re: Setting the current value in a DropDownList Cor Ligthert
5/1/2005 12:00:00 AM
BillG,

Or do you mean just setting the selectedindex.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolsdropdownlistclassselectedindextopic.asp

By the way, using names as BillG gives mostly no answers.

I hope this helps,

Cor

Re: Setting the current value in a DropDownList Cor Ligthert
5/1/2005 12:00:00 AM
BillG,

[quoted text, click to view]

There are an endless ways to do that, depending what you want to set in it.

Therefore you should in my opinion explain that first.

Cor

Re: Setting the current value in a DropDownList Cor Ligthert
5/1/2005 12:00:00 AM
[quoted text, click to view]
Than is that cleared.


:-)

Cor

Re: Setting the current value in a DropDownList Cor Ligthert
5/1/2005 12:00:00 AM
Bill

And did you set the selectedindex to its value?

Cor

Re: Setting the current value in a DropDownList BillG
5/1/2005 9:09:03 AM
Why, that is my name. Bill Gower.

[quoted text, click to view]
Re: Setting the current value in a DropDownList BillG
5/1/2005 1:13:23 PM
I have a ddl called ClassList which has ClassCD for DataValueField and
ClassDesc for DataTextField. I populate the list and then I load the current
member into the web form and I want to select the members classcd in the ddl
to show his/her current classcd



[quoted text, click to view]
AddThis Social Bookmark Button