[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

On Selection Changed not Triggered

Posted on 2011-10-25
6
Medium Priority
?
301 Views
Last Modified: 2012-05-12
The event prodedure is skipped.


aspx form:
<asp:DropDownList runat="server" DataValueField="ChapterID"
            DataTextField="ChapterName" Height="25px" Width="209px"
            DataSourceID="dscChapters" ID="ddlChapters"
            OnSelectionChanged="ddlChaptersSelected_Click">
    </asp:DropDownList>

aspx.cs :
set this line to halt processing.
Processing does not pause.
I set debug mode to true.
 protected void ddlChaptersSelected_Click(object sender, EventArgs e)
        {
            string mystring = "abc";
        }

Page_Load halts.
 protected void Page_Load(object sender, EventArgs e)
        {

        }

What am I missing?

Thanks,



0
Comment
Question by:Dovberman
  • 3
  • 2
6 Comments
 
LVL 28

Expert Comment

by:strickdd
ID: 37024515
AutoPostBack="true"
0
 

Accepted Solution

by:
Dovberman earned 0 total points
ID: 37024787
Should be OnSelectedIndexChanged="ddlChaptersSelected_Click"

Not OnSelectionChanged="ddlChaptersSelected_Click"

Thanks anyway.
0
 

Author Closing Comment

by:Dovberman
ID: 37052200
I resolved it myself.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 2

Expert Comment

by:owaisyahya
ID: 37026538
There is no event like "OnSelectionChanged" in asp.net for drop down lists, it should be OnSelectionChanged, and it will not work untill you specify autopostback value to true.

        <asp:DropDownList runat="server" DataValueField="ChapterID"
            DataTextField="ChapterName" Height="25px" Width="209px"
            DataSourceID="dscChapters" ID="ddlChapters" OnSelectedIndexChanged="ddlChapters_SelectedIndexChanged" AutoPostBack="true">
        </asp:DropDownList>


    protected void ddlChapters_SelectedIndexChanged(object sender, EventArgs e)
    {

    }

Open in new window

0
 
LVL 28

Expert Comment

by:strickdd
ID: 37026721
Regardless, what is missing is what I orignally posted:

AutoPostBack="true"
0
 

Author Comment

by:Dovberman
ID: 37027708
strickdd:

I also found out about AutoPostBack myself.

I corrected the method statement myself.

If you really need the points that badly, you can have them.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month18 days, 10 hours left to enroll

826 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question