Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7040007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:52:00+00:00 2026-05-28T01:52:00+00:00

I have a user control named LettersDropControl. It has a dropdown list. I am

  • 0

I have a user control named “LettersDropControl“. It has a dropdown list. I am using this control in a aspx page. When I change the selected item it is not calling the ddlLetters_SelectedIndexChanged event handler? What change I need to make in order to execute the code in ddlLetters_SelectedIndexChanged event handler?

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LettersDropControl.ascx.cs" Inherits="MSAJAX1.LettersDropControl" %>

    public partial class LettersDropControl : System.Web.UI.UserControl
    {

      private string selectedLetter;
      public string SelectedLetter
     {
        get { return selectedLetter; }
        set { selectedLetter = value; }
    }


    // Delegate 
    public delegate void OnButtonClick(string strValue);
    // Event 
    public event OnButtonClick btnHandler;


    protected void ddlLetters_SelectedIndexChanged(object sender, EventArgs e)
    {
        throw new Exception("TEST");

        SelectedLetter = ddlLetters.SelectedItem.Value;
        // Raise event if there is a subscription
        if (btnHandler != null)
        {
            btnHandler(string.Empty);
        }
    }


    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ddlLetters.Items.Add("A");
            ddlLetters.Items.Add("B");

        }
    }


}

The aspx page is

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MSAJAX1.Default" %>
<%@ Register TagPrefix="CP" TagName="LetterCtrl" Src="LettersDropControl.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
 </head>
<body>
    <form id="form1" runat="server">
   <div>
 <CP:LetterCtrl id="LetterCtrl1" runat="server" />
</div>
</form>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:52:01+00:00Added an answer on May 28, 2026 at 1:52 am

    Check in case you have added the AutoPostBack property for the concerned dropdown. something like this

    <asp:DropDownList 1" runat="server" AutoPostBack="True">

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have user control named DateTimeUC which has two textboxes on its markup: <asp:TextBox
I have an user control named GraphPanel. It has two dependency properties, one custom,
I have a user control named lets say ucName that has a property named
I am using an user control which have a button named 'btn_Save'.I need to
Ok, please understand the architecture here first. OurMasterPage.aspx has user control Header.ascx Header.ascx has
I have wpf window named 'GetStarted' with grid which is perent of user control
I have a Windows form which hosts a custom User Control. This User Control
I have one user control named XtraTreeList(It is combination of the treeview and datagridview)
I have a user control with a button named upload in it. The button
I have a windows forms user control in my project. It has been working

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.