473,320 Members | 1,804 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,320 software developers and data experts.

DropDownList

Hi
I looked everywhere to solve my problem but with no success. On page there
is a dropdownlist control which is binded to a database. When I select one
of the list item and press a button I would like to get the SelectedItem
property, but it is always set to Nothing. What should i do? On page load I
use Page.IsPostBack=false to load the dropdownlist only once.
Thanks!

Jure
Nov 17 '05 #1
7 5708
Have you set AutoPostBack =true of Ddl

Regards
Sushila
..NET MVP

"Mira Vizjak" <mi**********@guest.arnes.si> wrote in message news:be**********@planja.arnes.si...
Hi
I looked everywhere to solve my problem but with no success. On page there
is a dropdownlist control which is binded to a database. When I select one
of the list item and press a button I would like to get the SelectedItem
property, but it is always set to Nothing. What should i do? On page load I
use Page.IsPostBack=false to load the dropdownlist only once.
Thanks!

Jure



Nov 17 '05 #2
I don't want the page to reload so I can't use AutoPostBack=true.
Nov 17 '05 #3
I don't want the page to reload so I can't use AutoPostBack=true.
Nov 17 '05 #4
Did you set the 'EnableViewState' to true for the dropdownlist ?

"Mira Vizjak" <mi**********@guest.arnes.si> wrote in message
news:be**********@planja.arnes.si...
Hi
I looked everywhere to solve my problem but with no success. On page there
is a dropdownlist control which is binded to a database. When I select one
of the list item and press a button I would like to get the SelectedItem
property, but it is always set to Nothing. What should i do? On page load I use Page.IsPostBack=false to load the dropdownlist only once.
Thanks!

Jure

Nov 17 '05 #5
Did you set the 'EnableViewState' to true for the dropdownlist ?

"Mira Vizjak" <mi**********@guest.arnes.si> wrote in message
news:be**********@planja.arnes.si...
Hi
I looked everywhere to solve my problem but with no success. On page there
is a dropdownlist control which is binded to a database. When I select one
of the list item and press a button I would like to get the SelectedItem
property, but it is always set to Nothing. What should i do? On page load I use Page.IsPostBack=false to load the dropdownlist only once.
Thanks!

Jure

Nov 17 '05 #6
the item in a check list has a value and item text, are you setting the item
value?

"Mira Vizjak" <mi**********@guest.arnes.si> wrote in message
news:be**********@planja.arnes.si...
Hi
I looked everywhere to solve my problem but with no success. On page there
is a dropdownlist control which is binded to a database. When I select one
of the list item and press a button I would like to get the SelectedItem
property, but it is always set to Nothing. What should i do? On page load I use Page.IsPostBack=false to load the dropdownlist only once.
Thanks!

Jure

Nov 17 '05 #7
the item in a check list has a value and item text, are you setting the item
value?

"Mira Vizjak" <mi**********@guest.arnes.si> wrote in message
news:be**********@planja.arnes.si...
Hi
I looked everywhere to solve my problem but with no success. On page there
is a dropdownlist control which is binded to a database. When I select one
of the list item and press a button I would like to get the SelectedItem
property, but it is always set to Nothing. What should i do? On page load I use Page.IsPostBack=false to load the dropdownlist only once.
Thanks!

Jure

Nov 17 '05 #8

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

Similar topics

12
by: Stanley J Mroczek | last post by:
How do you load a dropdownlist when edit is clicked in a datagrid ? <Columns> <asp:BoundColumn DataField="OptionDescription" ItemStyle-Wrap="True" HeaderText="Option...
2
by: Dominic | last post by:
Hi guys, I'm not sure if this question belongs to FAQ, but I couldn't find a concrete answer. I created a Datagrid control using ItemTemplate, but it's NOT a in-place editing datagrid. One of...
10
by: Sacha Korell | last post by:
I'm trying to load a drop-down list with all DropDownList control names from another page. How would I be able to find those DropDownList controls? The FindControl method will only find a...
12
by: Stanley J Mroczek | last post by:
How do you load a dropdownlist when edit is clicked in a datagrid ? <Columns> <asp:BoundColumn DataField="OptionDescription" ItemStyle-Wrap="True" HeaderText="Option...
0
by: asmx126453 | last post by:
Hey mensen I am having some big troubles here i tryd solving it myself with internet for 2 days but i kind fix it. Its about this i have a DotNet project that alrydi is online and working for...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.