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 6133369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:13:09+00:00 2026-05-23T17:13:09+00:00

i created web page with dropdownlist and two gridview and on selectedindex changed event

  • 0

i created web page with dropdownlist and two gridview and on selectedindex changed event i fill the both of these gridview but in the running the both of gridview take long time to be filled.

Note:one of this gridview i created its datasource by code.
here my code snippet:

    protected void _ddlPLCs_SelectedIndexChanged(object sender, EventArgs e)
{
    DataTable dtStatus = new DataTable();

    dtStatus = DBLayer.getMachineNameIPStatusPlCByName(_ddlPLCs.SelectedValue);
    dtStatus.Columns.Add("Status", typeof(String));
    foreach (DataRow row in dtStatus.Rows)
    {
        if (LogicLayer.checkmachineStatus(row["machineIP"].ToString()))
            row["Status"] = "Online";
        else
            row["Status"] = "offline";

    }

    GVStatus.DataSource = dtStatus;
    GVStatus.DataBind();
    if (_ddlPLCs.SelectedValue.Contains('-'))
    {
        _dsPLCs.SelectParameters.Clear();
        _dsPLCs.SelectParameters.Add("PLCID","0");
        _dsPLCs.DataBind();
    }
    else
    {
        _dsPLCs.SelectParameters.Clear();
        _dsPLCs.SelectParameters.Add("PLCID", DBLayer.getPlCIDByName(_ddlPLCs.SelectedValue).ToString());
        _dsPLCs.DataBind();
    }            


}

pleas help me

  • 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-23T17:13:10+00:00Added an answer on May 23, 2026 at 5:13 pm

    Looking at the code, I think the problem is in this method:

    LogicLayer.checkmachineStatus()

    I have a hunch that this actually makes a network request to remote machines/devices to determine their status. This is going to be slow, especially if you have machines that might not be online and you have to wait for them to timeout.

    If this is the culprit, what you want to do instead is build a service that runs on your server. The service should continually make these checks in the background and update a database table with the results. You probably want to include a timestamp for the last check in the table. It might even be worth inserting rather than updating, so that you have history of when status’s were at different values. Your ASP.Net code should then just show the database table.

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

Sidebar

Related Questions

I've created a web page that lets you input some information and then draws
I have created a web page (ASP.NET) that includes a stylesheet to mimic Dynamics
I've created a windows forms control, which is hosted in a web page viewable
I created a web control, and it needs some data from its parent page.
I've created a master page that uses 3 instances of System.Web.UI.WebControls.AdRotator each backed by
I have created a web part Page and need to add css and javascript
I recently created a menu for a web page where buttons are DIV elements.
I've created a very simple asp.net web page for generating some HTML. The idea
I have created a web page and have put it under Inetpub/wwwroot/Test. Now I
A graphic designer created a web page design and I have it in PSD

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.