473,396 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
selectionindexchanged even for the DropDownList does not seem to fire.

Any help is appreciated.

Thanks in advance.

Mar 28 '08 #1
5 3989
The selectIndexChanged 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****@discussions.microsoft.comwrote in message
news:1E**********************************@microsof t.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
selectionindexchanged 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 SelectionIndexChanged 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
selectionindexchanged 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****@discussions.microsoft.comwrote in message
news:66**********************************@microsof t.com...
Nope, tried adding code in SelectionIndexChanged 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
selectionindexchanged 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*************@TK2MSFTNGP04.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****@discussions.microsoft.comwrote in message
news:66**********************************@microsof t.com...
>Nope, tried adding code in SelectionIndexChanged 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
selectionindexchanged 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 selectionindexchanged 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*************@TK2MSFTNGP04.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****@discussions.microsoft.comwrote in message
news:66**********************************@microsof t.com...
Nope, tried adding code in SelectionIndexChanged 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
selectionindexchanged 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
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...
3
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...
11
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
0
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...
0
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...
1
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...
3
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...
3
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"...
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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,...

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.