473,662 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

changing textBox text with change of DropDownList

I'm using the following code to change the value of my text box but it's
failing:

Private Sub usersDropDownLi st_SelectedInde xChanged(ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
usersDropDownLi st.SelectedInde xChanged

Dim Mv As New DataView(DsUser s1.Tables("user s"))
Mv.RowFilter = "id=" & usersDropDownLi st.SelectedValu e.ToString
emailAddressBox .Text = Mv.Item("EmailA ddress").ToStri ng

End Sub

Now DsUsers1 is the dataSet I'm using to populate my dropDownList
(usersDropDownL ist) so I know it's valid. It's pulling the data from the
"users" table and it's pulling down the fields "id, usersName and
emailAddress" but It's not changing the text on change. Any ideas?
Nov 21 '05 #1
1 1466
Disregard. I corrected this myself.

"rr****@800mcma han.com" wrote:
I'm using the following code to change the value of my text box but it's
failing:

Private Sub usersDropDownLi st_SelectedInde xChanged(ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
usersDropDownLi st.SelectedInde xChanged

Dim Mv As New DataView(DsUser s1.Tables("user s"))
Mv.RowFilter = "id=" & usersDropDownLi st.SelectedValu e.ToString
emailAddressBox .Text = Mv.Item("EmailA ddress").ToStri ng

End Sub

Now DsUsers1 is the dataSet I'm using to populate my dropDownList
(usersDropDownL ist) so I know it's valid. It's pulling the data from the
"users" table and it's pulling down the fields "id, usersName and
emailAddress" but It's not changing the text on change. Any ideas?

Nov 21 '05 #2

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

Similar topics

0
1527
by: Luis Esteban Valencia | last post by:
Hello. I have a datagrid with one row. I have a button that adds a new row. I am trying to implement that when the user selects one product it must change the price on the quantity column. Anyway when the user selects the first dropdownlist the dropdownselected_indexchanged is firring but when the user chagnes the second dropdownlist its not firing. aahh! if the user selects any of both dropdownlist the datagrid stays with only one row?...
3
4482
by: ton | last post by:
How can I detect that the user has modified the data on the page where several textboxes, checkboxes and dropdownlist exist. Ton
2
11048
by: Atreju | last post by:
Ok I got form within a c sharp page. Situation: On the form I have a drop downliwst and a textbox, the dropdownlist is populated with products and the textbox has a default vale of the product price. Problem: The first item prce in the dropdownlist is populated in the textbox. When I select another product from the dropdownlist the value within the
0
4261
by: Zark3 | last post by:
Hi all, In a web form I use a for loop to dynamically add TextBox'es to a page (one for each item in an input file). I can get the input values and I can display them in Label's and TextBox'es. That part works. However, my problem is that the form lets the user choose from input files; the labels are updated, the textboxes are not. This seems to me like it is a ViewState issue, I just can't figure out how to fix that... Apparently the...
3
2814
by: vivela | last post by:
hi, I hope you could help me out on this one,cause I have been trying for 4 days to solve it,but couldn't quite get it right: I have an ASP textbox that should change the value in a dropdownlist. this happens,but the problem is with the validation of the ddl.it has a requiredfieldvalidator,and the error message disapears only if i select a value from the dropdownlist,even though it should also disapear when I write a valid name in the...
0
2420
by: landesjoe | last post by:
Hi, here's my problem in short: Text boxes in gridview don't seem to hold their value if the column's .Visible property is changed back and forth. I've got a form with a gridview populated from a data view (which in turn is loaded from a manually setup DataTable for testing purposes). One of the columns in the grid is a checkbox that's tied to an event handler that'll change the .Visible property of a column with a text box. That text...
2
1648
by: SF | last post by:
Hi, I am new to VB.NET. I try to start my first project linking to an Access database. On my Form1, I have two fields (bound), Subject and Author. This was done by draginf the table into the form. Since the author name are mostly the same, I want to change this field to a dropdownlist but I do not know how!. In Access, I just right click the field and select Change To Combo Box Could someone advice?
0
2396
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile View I want the form populated from there profile on the sql server. The code to save the profile works fine. But when the user logs back in they data doesn't load back to the form. The multiview is located inside the LoginView's Logged-In View ....
1
1219
by: hal | last post by:
I'm trying to change the visibility of an imagebutton on a page after all the controls have been used. When the page loads it displays a disabled imagebutton1, but it's visible and imagebutton2 is invisible. I have three controls a dropdownlist, textbox, and a checkbox. I can get imagebutton1 to become invisible and imagebutton2 to become visible when the selectedindex changes for the dropdownlist and checkbox individually. First I...
0
8432
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
8857
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...
1
8546
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
8633
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
7367
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
6186
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
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
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
2
1993
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.