473,656 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FormView DropdownList - On Selection Change populate Text Box

C#, ASP.NET
Q: Have a formview, with a dropdownlist which is bound to a column. This
dropdownlist has a datasource of DataSet type. Now my objective is, on
Selection Changed of this DropdownList, I need to populate a couple of
TextBox's. How can I do this? What event does the code go into? The
selectionindexc hanged even for the DropDownList does not seem to fire.

Any help is appreciated.

Thanks in advance.

Mar 28 '08 #1
5 4026
The selectIndexChan ged event absolutely should fire. However, if you are
expecting it to cause a postback when you change the selection, you need to
set the AutoPostback property= true in the properties for this control.

Once you have got the event fireing its jsut a matter of writing your code
based on the selected index data.

HTH


"Satish" <Sa****@discuss ions.microsoft. comwrote in message
news:1E******** *************** ***********@mic rosoft.com...
C#, ASP.NET
Q: Have a formview, with a dropdownlist which is bound to a column. This
dropdownlist has a datasource of DataSet type. Now my objective is, on
Selection Changed of this DropdownList, I need to populate a couple of
TextBox's. How can I do this? What event does the code go into? The
selectionindexc hanged even for the DropDownList does not seem to fire.

Any help is appreciated.

Thanks in advance.

Mar 28 '08 #2
Nope, tried adding code in SelectionIndexC hanged Event and even tried with
the Debugger, nothing.

"Satish" wrote:
C#, ASP.NET
Q: Have a formview, with a dropdownlist which is bound to a column. This
dropdownlist has a datasource of DataSet type. Now my objective is, on
Selection Changed of this DropdownList, I need to populate a couple of
TextBox's. How can I do this? What event does the code go into? The
selectionindexc hanged even for the DropDownList does not seem to fire.

Any help is appreciated.

Thanks in advance.
Mar 28 '08 #3

Does your page_load event fire ?, if not, check that your Autowireup event
is set to true. Also, you didnt comment on the Autopostback I mentioned have
you checked this.

Whatever you problem is, its likely to be very basic.

"Satish" <Sa****@discuss ions.microsoft. comwrote in message
news:66******** *************** ***********@mic rosoft.com...
Nope, tried adding code in SelectionIndexC hanged Event and even tried with
the Debugger, nothing.

"Satish" wrote:
>C#, ASP.NET
Q: Have a formview, with a dropdownlist which is bound to a column. This
dropdownlist has a datasource of DataSet type. Now my objective is, on
Selection Changed of this DropdownList, I need to populate a couple of
TextBox's. How can I do this? What event does the code go into? The
selectionindex changed even for the DropDownList does not seem to fire.

Any help is appreciated.

Thanks in advance.

Mar 28 '08 #4
Should read "Autowireup " @page property
"Just Me" <news.microsoft .comwrote in message
news:Oi******** *****@TK2MSFTNG P04.phx.gbl...
>
Does your page_load event fire ?, if not, check that your Autowireup event
is set to true. Also, you didnt comment on the Autopostback I mentioned
have you checked this.

Whatever you problem is, its likely to be very basic.

"Satish" <Sa****@discuss ions.microsoft. comwrote in message
news:66******** *************** ***********@mic rosoft.com...
>Nope, tried adding code in SelectionIndexC hanged Event and even tried
with
the Debugger, nothing.

"Satish" wrote:
>>C#, ASP.NET
Q: Have a formview, with a dropdownlist which is bound to a column. This
dropdownlis t has a datasource of DataSet type. Now my objective is, on
Selection Changed of this DropdownList, I need to populate a couple of
TextBox's. How can I do this? What event does the code go into? The
selectioninde xchanged even for the DropDownList does not seem to fire.

Any help is appreciated.

Thanks in advance.


Mar 28 '08 #5
Page load fires, regardless of Postback - true/false.

However, the selectionindexc hanged event just does not fire.
I read thru the AutoEventWireup attribute and made sure that it is set to
true everywhere, webconfig as well as the aspx page itself.

I am also using VS2008.

"Just Me" wrote:
Should read "Autowireup " @page property
"Just Me" <news.microsoft .comwrote in message
news:Oi******** *****@TK2MSFTNG P04.phx.gbl...

Does your page_load event fire ?, if not, check that your Autowireup event
is set to true. Also, you didnt comment on the Autopostback I mentioned
have you checked this.

Whatever you problem is, its likely to be very basic.

"Satish" <Sa****@discuss ions.microsoft. comwrote in message
news:66******** *************** ***********@mic rosoft.com...
Nope, tried adding code in SelectionIndexC hanged Event and even tried
with
the Debugger, nothing.

"Satish" wrote:

C#, ASP.NET
Q: Have a formview, with a dropdownlist which is bound to a column. This
dropdownlist has a datasource of DataSet type. Now my objective is, on
Selection Changed of this DropdownList, I need to populate a couple of
TextBox's. How can I do this? What event does the code go into? The
selectionindex changed even for the DropDownList does not seem to fire.

Any help is appreciated.

Thanks in advance.


Mar 31 '08 #6

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

Similar topics

3
2013
by: Bas Paap | last post by:
I'm having a problem with formviews and DropDownLists in ASP.NET 2.0. I'm using a formview to insert an order into a database. Part of the order is the customer. Currently, I have a dropdownlist bound to a datasource that simply selects all customers from a database table. The DropDownList's Selectedvalue is bound with the following expression: Bind("customerId") This works perfectly, the id is passed to a stored procedure and the...
3
3153
by: sck10 | last post by:
Hello, I am trying to bind an arraylist to a FormView DropDownList control in the PreRender state. The error that I get is the following: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. Any help with this would be appreciated. -- Thanks in advance,
11
5805
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
0
1032
by: jobs at webdos | last post by:
My challenge is I need to populate a formview's dropdownlist even when my datasource does not find a record to bind with. I'm trying to avoid binding in the codebehind. This code works works fine when ratedatasource finds a row, but when it doesnot my dropdowns dont get popultated. Keep in mind I have two datasources, one for the form the other for my dropdownlist.
0
1296
by: Theam Kok Ming | last post by:
Hi All, I am a newbie to ASP.Net 2.0 . I would appreciate if anyone can enlighten me on my doubts I am building a simple customer registration website. I have the tables and GridView to display the list of existing customer. I have another FormView control to insert and edit customer data.
1
1436
by: Dave E | last post by:
Hi all, == brief version == using ASP 2.0, I have a ddl inside a formview. On update, if the ddl starts as NULL, no update happens. If the ddl has a bound value that is not NULL, then all updates happen as expected. How do I resolve this pleeeaase??!! :-)
3
4499
by: YMPN | last post by:
Hi Everyone, I'm deen from Riyadh. Please do help me with some problem i have. I have this formview control setup to recieved inputs from user (textbox, dropdownlist, others). After inserting, I want to send the data via email, the problem is how do I do that?
3
3633
by: J055 | last post by:
Hi I have a PlaceHolder control inside a FormView EditItemTemplate: <asp:PlaceHolder ID="phResponseText" runat="server"> <tr> <td> <asp:Label ID="lblResponseText" runat="server"></asp:Label></td> <td> <asp:TextBox ID="tbResponseText" runat="server" Text='<%#
0
1567
by: mkidd | last post by:
Hi, I'm trying to build an online form using asp.net and vb.net for the code behind in Visual Studio 2005. I want to fill 3 fields in a FormView that's connected to one table (table1) with information from another table (table2) by choosing the key field from table2 in a DropDownList. Table2 has 3 fields with info that doesn't change (name, phone# and
0
8816
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
8598
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
7310
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
6162
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
4150
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...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2721
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
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1598
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.