473,734 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DropDownList selecteditem, then make some changes in textbox.

Hello everyone,
Am having trouble solving a problem of DropDownList.

I have 2 dropdownlists say 'ddlA' and 'ddlB', and a text box.

Based on the selection in ddlA, I have to display some data in the
textbox. And on selection in ddlB, the data has to change in the same
textbox.

The problem is:
Am not able to capture the event which is getting fired on selection of
item from the dropdownlist. I tried using :

ddlA_SelectedIn dexChanged().. but its not getting fired.

Ne suggestions ???

Thanks..

Nov 19 '05 #1
4 1319
sam
Make sure that the viewstate is enabled for the dropdown and that you
are databinding it on *every* page load.

Also, selecting the first item in the list can sometimes not fire the
event for another reason.

Nov 19 '05 #2
Thanx Sam,
--The viewstate is enabled
--By databinding on 'every' page load, do u mean, I have to write the
DDLA.DataBind() in page_load ? I tried that, but still couldnt solve
the problem.

Ne other suggestions ??

Thnx.

Nov 19 '05 #3
sam
Did you put them in a form tag? Also make sure you bind them in page
load or page init.

Can you post some code?

Nov 19 '05 #4
In your ASPX page do you have AutoPostBack="T rue" in your DropDownList?
Hope that helps
Patrick
"Christina" <ch*********@ya hoo.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
Thanx Sam,
--The viewstate is enabled
--By databinding on 'every' page load, do u mean, I have to write the
DDLA.DataBind() in page_load ? I tried that, but still couldnt solve
the problem.

Ne other suggestions ??

Thnx.

Nov 19 '05 #5

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

Similar topics

0
2423
by: kamaumalone | last post by:
I have a dropdownlist which lives inside of a repeater. The repeater accepts user input via textboxes and the aforementioned dropdownlist. The repeater accepts phone numbers and allows for an arbitrary number of empty rows to be added to it. So, if a user knew in advance that they wanted to add 3 phone numbers, they can type the nuber '3' in a textbox (outside the repeater) and click a button (also outside of a repeater), and 3 new empty ...
0
1989
by: huobazi | last post by:
I have many dropdownlist controls in my ascx (and use LoadControl in a aspx fiel) file,so i write a method "InitList(DropDownList list,string strsql,string TextField,string ValueField)" but when i want to get the BigClassList.SelectedItem.Text and BigClassList.SelectedItem.Value in a button onclick method,btnSmallClassEdit_Click(....),there post an error " System.NullReferenceException: 佫¶ÔÏóÒýÓÃÉèÖõ½¶ÔÏóµÄʵÀý¡£", I Don't know the...
1
1709
by: m3ckon | last post by:
Hi there, please help if you can, I'm having an issue with droponnlists in a datagrid I have a datagrid which is populated from a query .. all works fine I've added two extra columns, one is a dropdownlist and the other is a button which runs the command selectcode for this:
3
2299
by: Lew Barnesson | last post by:
Hi All, I have looked and looked for an answer to the following problem (without success), and would be very grateful for a solution. The problem: The SelectedIndexChanged event code of an Asp.Net DropDownList changes text in an adjacent TextBox by either concatenating SelectedItem.Text (from the DropDownList) if it is not in the TextBox, or removing it if it is in the TextBox. This generally works very well.
1
1316
by: | last post by:
This is a crosspost from a less-frequented (but more focused) asp.net group; I didn't receive an answer that worked. I'd like to get this form functional. Could someone help on what's probably a simple syntax issue? I've attempted my due diligence with the usual books and references...but I'm new to ASP.NET. Question follows: The Code Project has a nice article on making a "self configuring form mailer web control." Basically, you apply...
2
2021
by: jason | last post by:
Pardon my ignorance on this. The below code works, except, when I edit a record and update the two drop downs take the first entry in the dropdownlist if not selected. I'd also like the dropdown to show the current value in edit mode. I'm sure this is a common question. I've reviewed several related post and tried them out to no avial. Some of the offerings in listgroup look right on, but are not clear on where to handle the suggested...
11
5811
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
1
4658
by: MaryamSh | last post by:
Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button ,another row will be created with the same control (I mean another dropdown and 2 button) and so on. and by pressing Remove button the selecetd row will be removed. I used viewstate to keep my value for postback, I want by changing selectedvalue of...
0
3500
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button ,another row will be created with the same control (I mean another dropdown and 2 button) and so on. and by...
0
9449
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9310
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9236
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
8186
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...
1
6735
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
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
4550
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...
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
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.