473,385 Members | 1,925 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.

Drop Down List User Control

I have created a user control that is a drop down list that pulls from
my database. I then drop that control into a detailsview control on
an insert item template. When I run the insert command, the drop down
list control isn't returning a value. How can I pass the value from
the drop down list control into the Insert Command Parameters? The
same situation works fine when the drop down list isn't a user control
but is created on the screen. I would like to use the usercontrol
because I will be using these values in multiple places.

Jun 19 '07 #1
1 1978
When you populate the ddl, in your usercontrol - are you doing it in the
page_Load event?
And if so - is it inside an Postback block?
And, is there a property you are using to get the DDL's selected item?

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://iWritePro.com

<ja*****@gmail.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.com...
>I have created a user control that is a drop down list that pulls from
my database. I then drop that control into a detailsview control on
an insert item template. When I run the insert command, the drop down
list control isn't returning a value. How can I pass the value from
the drop down list control into the Insert Command Parameters? The
same situation works fine when the drop down list isn't a user control
but is created on the screen. I would like to use the usercontrol
because I will be using these values in multiple places.

Jun 19 '07 #2

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

Similar topics

0
by: VB Programmer | last post by:
I have a user control that has a drop down list. Initially it has no items. The items are loaded into the drop down list in the Page_Load event of the user control. Basically if...
3
by: Don Wash | last post by:
Hi There! I have a Server-side Drop-down box in ASP.NET (VB) page. What do I do to widen the Drop down box's Pull-Down list's width? I'm not talking about the Drop-down box's width but the box...
13
by: Leszek Taratuta | last post by:
Hello, I have several drop-down lists on my ASP.NET page. I need to keep data sources of these lists in Session State. What would be the most effective method to serialize this kind of data...
3
by: pmud | last post by:
Hi, I have a drop down list bound to a database thorugh a data reader. It reads the customer names from data reader. Now, I want the user to be able to type more than one alphabet & the list...
2
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
17
by: Aussie Rules | last post by:
Hi, I want to have a single line combo box dropdown, but where i can selected multiple items in the drop down via a check box... I can see one in the standard tool box... is there one ? If...
3
by: John Walker | last post by:
Hi, On an ASP.NET page I have a drop down list control. When the user pulls down the list and makes a selection, I perform validation, and if the validation fails I want the selected item in...
6
by: zacks | last post by:
I have an application I am developing that has a Combo Box that is intended to show a list of available tables in the selected DSN. I have put code in the control's DropDown event handler to clear...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.