473,386 Members | 1,799 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,386 software developers and data experts.

DropDownList in a Repeater - OnSelectedIndexChange not firing

I have a (.Net 1.1) form with a Repeater and a DropDownList in the
ItemTemplate. I programmatically make the DDL Autopostback = true at
runtime based on the bound data. That works - I can see the postback
happen appropriately.
The DropDownList looks like this:

<asp:DropDownList id="ddMultiQty"
OnSelectedIndexChanged="ddMultiQty_SelectedIndexCh anged"
runat="server"></asp:DropDownList>

And in the codebehind I have this:

Public Sub ddMultiQty_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles ddMultiQty.SelectedIndexChanged
DoStuff()
End Sub

Setting a breakpoint on the declaration of the sub shows it never fires
when I changed the selected indexes of my repeated DDLs. Can anyone
point out why? Thanks!

Matt
Oct 1 '07 #1
2 3723
Hi,

do you initially databind the Repeater inside If Not Page.IsPostBack Then
check? Point is that if you databind in Page_Load on every request, that
prevents postback events of child controls (of the Repeater) from firing.
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"MattB" <so********@yahoo.comwrote in message
news:5m************@mid.individual.net...
>I have a (.Net 1.1) form with a Repeater and a DropDownList in the
ItemTemplate. I programmatically make the DDL Autopostback = true at
runtime based on the bound data. That works - I can see the postback happen
appropriately.
The DropDownList looks like this:

<asp:DropDownList id="ddMultiQty"
OnSelectedIndexChanged="ddMultiQty_SelectedIndexCh anged"
runat="server"></asp:DropDownList>

And in the codebehind I have this:

Public Sub ddMultiQty_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles ddMultiQty.SelectedIndexChanged
DoStuff()
End Sub

Setting a breakpoint on the declaration of the sub shows it never fires
when I changed the selected indexes of my repeated DDLs. Can anyone point
out why? Thanks!

Matt

Oct 1 '07 #2
Teemu Keiski wrote:
Hi,

do you initially databind the Repeater inside If Not Page.IsPostBack Then
check? Point is that if you databind in Page_Load on every request, that
prevents postback events of child controls (of the Repeater) from firing.

I am, so that must be the issue. Problem is, it's very dynamic data that
I want to keep as fresh as possible. I'll try a different approach.
Thanks for the tip!

Matt
Oct 1 '07 #3

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

Similar topics

1
by: Jay | last post by:
I have dropdownlist in a usercontrol and selectedindexchange event captured. But Iam seeing fire twice. Thanks.
1
by: ProSAAP | last post by:
I need help. I am attaching both the html stuff as well as the code snippet that is not firing. Can someone please help me Thank Sub InputPub_SelectedIndexChanged(ByVal sender As Object, ByVal e...
4
by: George | last post by:
I'm using .NET framework 1.1 and VS.NET 2003 for a aspx web form. There is a DropDwonList on the page and its SelectedIndexChanged event is fired to the server normally, until when I add another...
3
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...
0
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...
3
by: Mark Rae | last post by:
Hi, Apologies, but I appear to be having a senior moment... I have a standard DropDownList webcontrol with a SelectedIndexChanged event, as follows: <asp:TableCell ColumnSpan=4...
1
by: =?iso-8859-1?B?R2VhcvNpZA==?= | last post by:
Hi, Wierd problem. Using ASP.NET 2.0. Have a DropDownList - <asp:DropDownList ID="DropDownListMake" runat="server" CssClass="selectComparison" AutoPostBack="True"...
4
by: Waldy | last post by:
Hi there, I have a web form with some DropDownList controls that I am trying to trap the selection change and run the attached server code. However, even thought the controls have the runat...
3
by: E. Kwong | last post by:
I have a DropDownList which is originally bound to a SqlDataSource. In Design view, the control is shown as "Databound". Later I changed my mind and changed the dropdown binded to a datatable...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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
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...

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.