473,473 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

My Dropdownlist keeps getting repopulated

I remember in 1.1 that I would put not to populate a given dropdownlist
unless it was not Page.IsPostBack. But in 2.0 where I use the DAL and
no codefile, I don't see where to effect this. Any help is
appreciated. I want my dropdownlist to keep what the use selected when
the page refreshes. Thanks.

Oct 6 '06 #1
2 1281
You mean you are using drag and drop binding (aka declarative binding) and
cannot affect it? It should automatically only call on initial post if you
are doing this, unless you override some defaults.

Or, do you mean you created a DAL and have bound it? You might not have this
set up to do what the above should. In this case, I would move the
declarative binding out and use code to bind. You can then specify.

Or, I am completely off base and do not understand what you are saying. :-)

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com/

*************************************************
Think Outside the Box!
*************************************************
<ne***********@gmail.comwrote in message
news:11********************@m73g2000cwd.googlegrou ps.com...
>I remember in 1.1 that I would put not to populate a given dropdownlist
unless it was not Page.IsPostBack. But in 2.0 where I use the DAL and
no codefile, I don't see where to effect this. Any help is
appreciated. I want my dropdownlist to keep what the use selected when
the page refreshes. Thanks.

Oct 7 '06 #2
Actually, I figured out it is only rebinding all the dropdownlist
contents on the subpage. The ddl is on the masterpage. The user
select category 1, then ddl populates with category 2. The user
selects category 2 and in my codefile I have my masterpage redirect to
another page on my site with the selectedValue from the ddl. When the
new page loads from the redirect and because it has the same masterpage
the dropdownlists repopulates. That redirect is not a postback, but a
real first time visit.

Maybe I shouldn't do the redirect, but I don't know another way to pass
the value from my ddl to the subpage without using the redirect with a
querystring variable (the variable, of course, is the selectedValue.)

Thanks for your help.

Cowboy (Gregory A. Beamer) wrote:
You mean you are using drag and drop binding (aka declarative binding) and
cannot affect it? It should automatically only call on initial post if you
are doing this, unless you override some defaults.

Or, do you mean you created a DAL and have bound it? You might not have this
set up to do what the above should. In this case, I would move the
declarative binding out and use code to bind. You can then specify.

Or, I am completely off base and do not understand what you are saying. :-)

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com/

*************************************************
Think Outside the Box!
*************************************************
<ne***********@gmail.comwrote in message
news:11********************@m73g2000cwd.googlegrou ps.com...
I remember in 1.1 that I would put not to populate a given dropdownlist
unless it was not Page.IsPostBack. But in 2.0 where I use the DAL and
no codefile, I don't see where to effect this. Any help is
appreciated. I want my dropdownlist to keep what the use selected when
the page refreshes. Thanks.
Oct 7 '06 #3

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

Similar topics

2
by: Dimitris Pantazopoulos | last post by:
Ok, let's say I recreate the dynamically-added Dropdownlist controls of my web form even at postbacks. That means they are repopulated with values as well. (If I don't I won't be getting anything...
1
by: Wanda | last post by:
Hi, I am trying to read the DropDownList's selectedIndex when it fires the event "SelectedIndexChanged", however, the index value is always 0 no matter what I've clicked. I just wonder what...
12
by: darrel | last post by:
I have a asp:dropdownlist set to autopostback. However, my handler doesn't seem to execute (even though there is a postback). Here's the DDL: <asp:dropdownlist id=ddl_districtSelect...
3
by: Kent Ogletree | last post by:
I do not know why this is being such a problem to me today, hopefully someone can help me figure out where I am going wrong. Simple DropDownList that is populated from a arraylist. Current...
0
by: Rabbit | last post by:
Hi, All, I have a FormView, in which the InsertItemTemplate has a dropdownlist that I need to set the datasource as my self created dataset. I have been trying various syntax like following at...
7
by: mosscliffe | last post by:
Is it possible to get at the TextField Contents of a SelectedValue in a DropDownList in ASP ? Thank You
0
by: Jose Fernandez | last post by:
Hello First of all, excuse my english We all know that in a normal page with codebehind we add a dropdownlist control and we bind() it in the (!ISPOSTBACK), so, we don't need to go to database...
3
by: Jon Paal | last post by:
this text keeps showing up in my gridview dropdownlist "System.Data.DataRowView" How do I prevent this problem ?
2
by: mylog | last post by:
Hi I am having a problem of getting the value from the dynamically generated table and dropdownlist. What I am facing is, I have created a table in the aspx page and now I need to add values to...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.