473,769 Members | 7,315 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

crazy behaviour from controls

Hey everyone... this is nuts... really hope someone can
help out.

I've got eight HtmlSelect controls on the web form. They
each are set to runat server. When the page is loaded,
they are filled using data from a database and a loop that
creates the listitems and adds them, no databinding.

If there is a query string value on the page, I set the
value and selected index of each control to the data that
corresponds to the id in the querystring. Here's where it
goes nuts...

I can step through the code in VS.Net and actually watch.
When one of the eight controls has it's value set, all the
controls get set to that value. This happens for each of
the eight, so after the page loads, they all have the last
value.

I've tried using asp:dropdownlis ts and the same thing
happens. I've tried setting the values statically in the
code behind to, just giving them an arbitrary value that's
in the list, same thing happens.

Anyone have any ideas?

if ( levels [ 1 ].IndexOf ( "Any" ) != -1 )
{
ddlAdventureRat ingBottom.Disab led = true;
ddlAdventureRat ingTop.Disabled = true;
chkAdventureAll Ratings.Checked = true;
}
else
{
ddlAdventureRat ingBottom.Value = filterNumbers (
levels [ 1 ], 1 );
ddlAdventureRat ingTop.Value = filterNumbers (
levels [ 1 ], 2 );
}

if ( levels [ 2 ].IndexOf ( "Any" ) != -1 )
{
ddlCraftingLeve lBottom.Disable d = true;
ddlCraftingLeve lTop.Disabled = true;
chkCraftingAllL evels.Checked = true;
}
else
{
ddlCraftingLeve lBottom.Value = filterNumbers (
levels [ 2 ], 1 );
ddlCraftingLeve lTop.Value = filterNumbers ( levels
[ 2 ], 2 );
}

Nov 17 '05 #1
0 876

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

Similar topics

9
2340
by: rbronson1976 | last post by:
Hello all, I have a very strange situation -- I have a page that validates (using http://validator.w3.org/) as "XHTML 1.0 Strict" just fine. This page uses this DOCTYPE: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> When I change the DOCTYPE to (what should be the equivalent):
5
1407
by: Shannon Harvey | last post by:
I'm trying to use the Current event in a simple MS Access 2000 form. I'd like to conditionally display a field if another boolean-typed field is set to True/Yes. That is, if I navigate to a record where the value of the test field is set to True, the code in my Current event should make two other controls appear (.Visible=True). Otherwise, keep the controls hidden (.Visible=False) What seems to happen is that the code I write in the...
32
1984
by: Chumbo | last post by:
If I have this(please bear with me - this is a case of a former java guy going back to C ;-) int main () { char *tokconvert(char*); char str = "dot.delimited.str"; char *result; result = tokconvert(str); return 0;
14
1596
by: Jason Sewall | last post by:
Hello, I'm using the intel C++ 8.0 compiler on windows and I'm working on some software that uses the following lines of code: gf->invdim = 1.0/(double)dim; printf("invdim: %f\n", (float)gf->invdim); dim is an integer, gf->invdim a double. I always get "-1.#IND00" as the output of this code, no matter the value of dim, but only at certain
4
1833
by: ifmusic | last post by:
i have this sort of server - client (which is described as servents in the gnutella specification, and it's what i'm trying to do..) And this is what happens: SOMETIMES, when computer A sends through a socket 37bytes, Computer B recieves 37bytes, and prints certain info about it. Now, other more irritating TIMES, computer A has to send two Packet, one first, then another, both 37bytes long , the Send function on computer A Tells me, Hey!...
0
3034
by: Matthias Lohrer | last post by:
Hi, I want to add dynamically controls to my aspx-Page by using the Page.parseControl-method. Page_Load contains this code: str = "<asp:TextBox runat='server' id='txtEingabe' TextMode='SingleLine' /><asp:RequiredFieldValidator id='req' runat='server' ControlToValidate='txtEingabe'>Bitte um eine
3
5265
by: Navin | last post by:
Hello friends... On a single asp.net web page i have a single server-side form that contains a couple of user-controls. Each user control has its own functionality and contains server-side textbox controls, requiredfieldvalidator controls which validate the textboxes, and a linkbutton control that postbacks the web page. The problem is, when the user clicks on the linkbutton control on one user control, the requiredfieldvalidator gets...
5
1249
by: Lee | last post by:
Hi, I am saving a forms location by getting the x and y coordinates as such;- this.Location.X.ToString(); this.Location.Y.ToString(); when i again load the form i am using the saved x and y coordinates as such;-
1
1348
by: shapper | last post by:
Hello, I have a class where I created various controls. One of the controls have a property which is a generic list of WebControl. Then in web site page I have something like: Dim a As New MyNamespace.ListItem a.WebControls.Add(tbName) a.WebControls.Add(lLabel)
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9998
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8876
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.