473,670 Members | 2,331 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SelectedIndexCh anged event does not fire?

Jim
Hi All,

Can someone tell me why the SelectedIndexCh anged event does not fire?

<form id="Form1" method="post" runat="server">

<asp:Table id="Table1" runat="server" Width="455px" Height="61px">

<asp:TableRow >

<asp:TableCel l>

<asp:DropDownLi st id="DropDownLis t1" runat="server" Width="263px"
AutoPostBack="T rue">

<asp:ListItem Value="bef">bef </asp:ListItem>

<asp:ListItem Value="kut">kut </asp:ListItem>

</asp:DropDownLis t>

</asp:TableCell>

</asp:TableRow>

</asp:Table>

</form>


private void DropDownList1_S electedIndexCha nged(object sender,
System.EventArg s e)

{

Response.Write( "it works!"); //no way!!

}

ch Jim
Nov 19 '05 #1
3 1642
Where is the evnet hooked?
Since you aren't explicitely showing it and your method is private, make
sure this.DropDownLi st1.SelectedInd exChange +=
this.DropDownLi st1_SelectedInd exChanged; is in the onInit

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Jim" <ji*******@hotm ail.com> wrote in message
news:OZ******** ******@TK2MSFTN GP12.phx.gbl...
Hi All,

Can someone tell me why the SelectedIndexCh anged event does not fire?

<form id="Form1" method="post" runat="server">

<asp:Table id="Table1" runat="server" Width="455px" Height="61px">

<asp:TableRow >

<asp:TableCel l>

<asp:DropDownLi st id="DropDownLis t1" runat="server" Width="263px"
AutoPostBack="T rue">

<asp:ListItem Value="bef">bef </asp:ListItem>

<asp:ListItem Value="kut">kut </asp:ListItem>

</asp:DropDownLis t>

</asp:TableCell>

</asp:TableRow>

</asp:Table>

</form>


private void DropDownList1_S electedIndexCha nged(object sender,
System.EventArg s e)

{

Response.Write( "it works!"); //no way!!

}

ch Jim

Nov 19 '05 #2
In your code behind, is the DropDownList1_S electedIndexCha nged method
assigned to DropDownList1's IndexChanged event? It needs to be either in the
code behind or in the ASPX page

--
------------------------------------------
Damon Payne
http://www.damonpayne.com
"Jim" <ji*******@hotm ail.com> wrote in message
news:OZ******** ******@TK2MSFTN GP12.phx.gbl...
Hi All,

Can someone tell me why the SelectedIndexCh anged event does not fire?

<form id="Form1" method="post" runat="server">

<asp:Table id="Table1" runat="server" Width="455px" Height="61px">

<asp:TableRow >

<asp:TableCel l>

<asp:DropDownLi st id="DropDownLis t1" runat="server" Width="263px"
AutoPostBack="T rue">

<asp:ListItem Value="bef">bef </asp:ListItem>

<asp:ListItem Value="kut">kut </asp:ListItem>

</asp:DropDownLis t>

</asp:TableCell>

</asp:TableRow>

</asp:Table>

</form>


private void DropDownList1_S electedIndexCha nged(object sender,
System.EventArg s e)

{

Response.Write( "it works!"); //no way!!

}

ch Jim

Nov 19 '05 #3
Jim
thanks Carl and Damon for the solution!

ch Jim
"Damon Payne" <da***@damonpay ne.com> schreef in bericht
news:XY******** ***********@twi ster.rdc-kc.rr.com...
In your code behind, is the DropDownList1_S electedIndexCha nged method
assigned to DropDownList1's IndexChanged event? It needs to be either in
the
code behind or in the ASPX page

--
------------------------------------------
Damon Payne
http://www.damonpayne.com
"Jim" <ji*******@hotm ail.com> wrote in message
news:OZ******** ******@TK2MSFTN GP12.phx.gbl...
Hi All,

Can someone tell me why the SelectedIndexCh anged event does not fire?

<form id="Form1" method="post" runat="server">

<asp:Table id="Table1" runat="server" Width="455px" Height="61px">

<asp:TableRow >

<asp:TableCel l>

<asp:DropDownLi st id="DropDownLis t1" runat="server" Width="263px"
AutoPostBack="T rue">

<asp:ListItem Value="bef">bef </asp:ListItem>

<asp:ListItem Value="kut">kut </asp:ListItem>

</asp:DropDownLis t>

</asp:TableCell>

</asp:TableRow>

</asp:Table>

</form>


private void DropDownList1_S electedIndexCha nged(object sender,
System.EventArg s e)

{

Response.Write( "it works!"); //no way!!

}

ch Jim


Nov 19 '05 #4

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

Similar topics

0
5417
by: PeacError | last post by:
Using Microsoft Visual Studio .NET 2003, Visual C# .NET 1.1: I apologize if this question has been addressed elsewhere, but I could not find a reference to it in the search engine for this board. I have a form that contains a ListView and a GroupBox control. The GroupBox control itself contains several TextBox Controls. I have Validating and Validated event handlers set for the GroupBox control, and a SelectedIndexChanged event...
1
8383
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What I want to do is to allow the user to click on the row that corresponds to the correct address, and have the code behind populate the form's Address1, Address2 etc. controls with the relevant data items. I put the code for this into the...
0
1742
by: tafpin | last post by:
I have an application with a datagrid. In the IDE I have 2 template columns. The first has an image button and the second contains a link button. According to the results that I get back I must add more columns to the datagrid. This is a sample of how I am adding these colums: templateColumn = New TemplateColumn
3
2626
by: Alec MacLean | last post by:
Hi, I have a couple of win forms where I am editing values that are stored in a SQL database. I'm using the listbox control to hold the data object each form interacts with. Each object is defined by my own classes. On the first form, I use an approach to reduce the number of database calls. This essentially consists of :
4
5247
by: lakepeir | last post by:
Hello, I have combobox with a selectedindexchanged method that seems to be called when starting the application, launching the form with the combobox and making a change in the drop down box of the combobox. Can anyone tell me why the method is called so often? I would only like the method executed when a user makes a change in the drop down box. Am I using the incorrect method. Thanks.
0
8388
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8817
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...
0
7423
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
6218
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
4215
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
4396
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2804
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
2046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1799
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.