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

Dropdownlist Problem

Hi,

I have several dropdowns in my aspx-page and read the values
after I press a save-button. from these dropdowns which are filled
from database via databind() I always get the value which was selected
at page load. changes are not recognized. the dropdowns which are filled
staticly in the html, I get the right selected value.

here is my code:

public void btnSave_Click(Object sender, EventArgs e) {
ArrayList arrOrder = new ArrayList();
arrOrder.Add(ddClient.SelectedValue); -> always value "1", filled via databind()
arrOrder.Add(ddCode.SelectedValue); -> OK, filled manually
arrOrder.Add(u.getSessionValue("UserID"));
arrOrder.Add(tbClientOrderNumber.Text);
arrOrder.Add(tbNewOrderNumber.Text);
arrOrder.Add(tbProductDescription.Text);
..
..
..
}
thanx for any help
pascal
Jul 21 '05 #1
6 1004
Cor
Hi Pascal,

(I could copy this is also another time in this newsgroup)

It sounds to me if you have not:
If not IsPostback in the load event of your page.

The load event is always processed with every send.

I hope this was the problem?

Cor

Jul 21 '05 #2
many thanks,

it was the postback problem.
i did not know that with an explicit button onclick-event
also the postback-event is fired.

pascal

"Cor" <no*@non.com> schrieb im Newsbeitrag
news:OK**************@TK2MSFTNGP09.phx.gbl...
Hi Pascal,

(I could copy this is also another time in this newsgroup)

It sounds to me if you have not:
If not IsPostback in the load event of your page.

The load event is always processed with every send.

I hope this was the problem?

Cor



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 21 '05 #3
all events on server controls cause postbacks, watch out for it, sometimes
its so quick when developing that you wont notice it.

Another Hint : If your dynamicly adding controls to your page, these will
have to be re-added for every postback!
"Pascal" <ps*******@freesurf.ch> wrote in message
news:40********@corp.newsgroups.com...
many thanks,

it was the postback problem.
i did not know that with an explicit button onclick-event
also the postback-event is fired.

pascal

"Cor" <no*@non.com> schrieb im Newsbeitrag
news:OK**************@TK2MSFTNGP09.phx.gbl...
Hi Pascal,

(I could copy this is also another time in this newsgroup)

It sounds to me if you have not:
If not IsPostback in the load event of your page.

The load event is always processed with every send.

I hope this was the problem?

Cor



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Jul 21 '05 #4
Cor
Hi Pascal,

(I could copy this is also another time in this newsgroup)

It sounds to me if you have not:
If not IsPostback in the load event of your page.

The load event is always processed with every send.

I hope this was the problem?

Cor

Nov 22 '05 #5
many thanks,

it was the postback problem.
i did not know that with an explicit button onclick-event
also the postback-event is fired.

pascal

"Cor" <no*@non.com> schrieb im Newsbeitrag
news:OK**************@TK2MSFTNGP09.phx.gbl...
Hi Pascal,

(I could copy this is also another time in this newsgroup)

It sounds to me if you have not:
If not IsPostback in the load event of your page.

The load event is always processed with every send.

I hope this was the problem?

Cor



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 22 '05 #6
all events on server controls cause postbacks, watch out for it, sometimes
its so quick when developing that you wont notice it.

Another Hint : If your dynamicly adding controls to your page, these will
have to be re-added for every postback!
"Pascal" <ps*******@freesurf.ch> wrote in message
news:40********@corp.newsgroups.com...
many thanks,

it was the postback problem.
i did not know that with an explicit button onclick-event
also the postback-event is fired.

pascal

"Cor" <no*@non.com> schrieb im Newsbeitrag
news:OK**************@TK2MSFTNGP09.phx.gbl...
Hi Pascal,

(I could copy this is also another time in this newsgroup)

It sounds to me if you have not:
If not IsPostback in the load event of your page.

The load event is always processed with every send.

I hope this was the problem?

Cor



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Nov 22 '05 #7

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

Similar topics

2
by: Brennon Arnold | last post by:
I have a problem that I figured would be relatively common, but have been unable to find any information on it as of yet. I have a page that contains two DropDownList controls, with the second...
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: Antonio D'Ottavio | last post by:
Good Morning, In my web page I've a datalist that is sourced by a database, the problem is that I want that one of the column of the datalist contain a dropdownbox that also is sourced by a table...
1
by: Antonio D'Ottavio | last post by:
Good morning, I've a problem with a dropdownlist located inside any row of a datalist, I fill both datalist and dropdownlist at runtime, the problem is with the dropdownlist infact using the event...
10
by: dhnriverside | last post by:
Hi guys Still having a problem with this dropdownlist. Basically, I've got 4. The first 2 work fine, then my code crashes on the 3rd. ddlEndTimeHour.Items.FindByValue(endTime).Selected =...
4
by: Mark Waser | last post by:
I've discovered a very odd bug when attempting to put a dropdown list in a datagrid. In the page PreRender step, the selected index of the datagrid is successfully set during databinding. Yet,...
0
by: Juanjo | last post by:
Hi, Before, I was working with Asp.net 1.0 and datagrid. I posted a question for this issue. The solution of this problem is load the second dropdownlist on the selectedindexchanged event of the...
3
by: Lohboy | last post by:
Using ASP.NET and IE7. (Sorry if I am posting in the wrong forum but my problem seemed to be more related to the JavaScript side than the ASP.NET side.) I have two DropDownList controls the...
1
by: Brett | last post by:
I have a DropDownList in an ASP.NET web form that is populated with items from a lookup table by binding that DropDownList to a SqlDataSource. However, the items in the lookup table can change over...
6
by: shashi shekhar singh | last post by:
Respected Sir, I have to create multiple dynamic dropdownlist boxes and add items dynamically in <asp:table> server control but problem occurs , i.e. except of fist dropdown list no dropdownlist...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.