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

  • Home
  • SEARCH
  • 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 7980685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:09:04+00:00 2026-06-04T10:09:04+00:00

//my problem is when i fire SelectedIndexChanged event of ddlmodalitylist asynchronously(ajax call) then javascript

  • 0

//my problem is when i fire SelectedIndexChanged event of ddlmodalitylist asynchronously(ajax call) then javascript load event is not fired..thats y i have to fire onload event from server side.

window.onload = body_Onload;

     function body_Onload() {
        //javascript code
       }

    protected void ddlModalityList_SelectedIndexChanged(object sender, EventArgs e)
        {
            ddlStudy.Items.Clear();
            ListItem selectedPair = ddlModalityList.SelectedItem;
            string str= selectedPair.Value;

           int ID= Convert.ToInt32(str);

           if (ID == -1)
           {
              // ddlStudy.Items.Clear();
               return;
           }



            DataTable dataTableStudy = null;
            dataTableStudy = objSqlDbComm.ExecuteDatasetQuery(strSQL).Tables[0];

            var dictioneryStudy = new Dictionary<int, string>();
            foreach (DataRow dr in dataTableStudy.Rows)
            {          

                dictioneryStudy.Add(Convert.ToInt32(dr["Study_ID"]), dr["Study_Desc"].ToString());
            }

            ddlStudy.DataTextField = "Value";
            ddlStudy.DataValueField = "Key";
            ddlStudy.DataSource = dictioneryStudy;
            ddlStudy.DataBind();
            ddlStudy.Items.Insert(0, new ListItem("[Select]", "-1"));
            ddlStudy.Items[0].Selected = true;

        }
  • 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-06-04T10:09:06+00:00Added an answer on June 4, 2026 at 10:09 am
    Sys.Application.add_init(your_bodyload_function);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this problem that event called MouseEnter does not fire when mouse button
I have a problem trying to have a single onmouseover event fire in IE,
I have a problem that the ViewWillAppear method for a UIView does not fire
I have a List in LWUIT. My problem is this. When I press FIRE
I have a problem which I can't seem to be figuring out: I load
I have a problem using fire() with a GWT RequestFactory after I've used it
I have a problem while writting event for ImageUpload User control. I want to
I have used inner join in my php page. Problem is when I fire
I have a problem with the Event object being null when I want to
Background Use Ajax to fire an event to the web server when a list

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.