Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 7th, 2006, 05:35 AM
Authorized User
 
Join Date: Nov 2006
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default onSelectedIndexChanged event not firing???

Hi,
Every command that i write in onSelectedIndexChanged method of my Dropdownlist control doesn't run.
What's the problem?
 
Old December 7th, 2006, 12:49 PM
Authorized User
 
Join Date: Sep 2006
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

1) CHeck Whether autopostback in enabled in control
2) Delete the event handler method , Then Double click the control then write the code then check.

If not works , come back again
 
Old December 11th, 2006, 03:54 AM
Authorized User
 
Join Date: Nov 2006
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks i'm going to try it.

 
Old December 14th, 2006, 04:06 PM
Registered User
 
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have a similar problem.

I have a web custom control with a DropDownList. When the SelectedIndexValue changes, it should do specific action for a particular choice.

It's my first control, and I'm not sure I'm impletemented the good interface.

Contol:

namespace Minutor
{
    public class Minutor : System.Web.UI.WebControls.WebControl, IPostBackDataHandler, IPostBackEventHandler
    {
    ....

    private DropDownList _minutes;

    public Minutor()
        {
            //
            // TODO: Add constructor logic here
            //
            _minutes = new DropDownList();
            _minute.AutoPostBack = true;
            _minutes.SelectedIndexChanged += new EventHandler(_minutes_SelectedIndexChanged);

     ....

        void _minutes_SelectedIndexChanged(object sender, EventArgs e)
        {
            _autreSelected = true;
        }


Basically that's the control. But the SelectIndexChanged event never fires...

I did something wrong?


Thanks for your help,

Chris

 
Old December 19th, 2006, 08:20 AM
Registered User
 
Join Date: Jun 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

virendar23,
.. Good advice, and when I did this I got the event firing [caught it in the pageLoad event on the way back].
But this is really flaky, I now get this result 1 time in 10.

..... Driving me nuts....
D.


 
Old December 19th, 2006, 10:35 AM
Registered User
 
Join Date: Jun 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Scott Schecter identified that this problem - which is particular to the Dotnetnuke framework - was solved by setting the cache time to zero [default is 60 seconds].







Similar Threads
Thread Thread Starter Forum Replies Last Post
selectedindexchanged event not firing kaliaparijat ASP.NET 2.0 Professional 1 June 5th, 2008 08:58 AM
Event Firing tobriain C# 1 June 12th, 2007 08:19 AM
Custom event not firing flegel ASP.NET 2.0 Professional 0 February 23rd, 2007 06:31 AM
OnSelectedIndexChanged event not firing ethertt77 ASP.NET 2.0 Basics 2 February 20th, 2006 07:34 PM
catching the OnSelectedIndexChanged event Aaron Edwards Classic ASP Professional 1 October 5th, 2005 02:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.