473,385 Members | 1,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Setting the current value in a DropDownList

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.

Jul 21 '05 #1
6 1549
BillG,

Or do you mean just setting the selectedindex.
http://msdn.microsoft.com/library/de...indextopic.asp

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

I hope this helps,

Cor
Jul 21 '05 #2
BillG,
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.


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
Jul 21 '05 #3
Why, that is my name. Bill Gower.

"Cor Ligthert" wrote:
BillG,

Or do you mean just setting the selectedindex.
http://msdn.microsoft.com/library/de...indextopic.asp

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

I hope this helps,

Cor

Jul 21 '05 #4
> Why, that is my name. Bill Gower.
By the way, using names as BillG gives mostly no answers.

Than is that cleared.
:-)

Cor
Jul 21 '05 #5
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

"Cor Ligthert" wrote:
Why, that is my name. Bill Gower.
By the way, using names as BillG gives mostly no answers.

Than is that cleared.
:-)

Cor

Jul 21 '05 #6
Bill

And did you set the selectedindex to its value?

Cor
Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Maziar Aflatoun | last post by:
Hi everyone, I have the following code <asp:TemplateColumn HeaderText="Administator" Visible="True" ItemStyle-HorizontalAlign="Center"> <ItemTemplate> <asp:Label ID="IsAdministator"...
2
by: jason | last post by:
Pardon my ignorance on this. The below code works, except, when I edit a record and update the two drop downs take the first entry in the dropdownlist if not selected. I'd also like the dropdown to...
9
by: james.e.coleman | last post by:
Hello, I have created a custom dropdownlist that is used multiple times within a single page. When trying to set the values of the controls with the page in which they are being used, they all...
2
by: jason | last post by:
Hello and Good Day. REALLY LOST. Running ASP.NET 1.1 Becuase I think I'm using my own controls smartnavigation does not appear to work for me. Stardard issue: I've got a datagrid thats...
10
by: BillG | last post by:
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.
7
by: segal.aviad | last post by:
Hi, I'm trying to write a web page containing three dropdowns. The dropdowns are declared as follows: <asp:DropDownList id="cmbCat1" runat="server" AutoPostBack="true"></asp:DropDownList>...
0
by: Rocky | last post by:
Dear ALL, I am facing a bit problem in DATAGRID. so may be you guys can help me out. Actually on a DataGrid I am having following controls: 1) 2 DropDown Menu 2) 1 Text Box 3) 1 ADD Button 4)...
7
by: Brad Pears | last post by:
I have something strange going on - pretty sure it used to work before - and now it does not... Why does the following code not clear a combo box? Me.cboLocation.Text = String.Empty OR ...
1
by: =?Utf-8?B?R3JlZw==?= | last post by:
I have a page that displays a DropDownList control that allows a Manager Name to be selected from a listing of Managers for a User. So, on my main user.aspx page, I include a DropDownList control...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.