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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:27:48+00:00 2026-05-13T10:27:48+00:00

I’d like to say it’s the query, but it isn’t. Even when we go

  • 0

I’d like to say it’s the query, but it isn’t. Even when we go through it step-by-step, the queries finish without a hitch. Even the .DataBind() method doesn’t APPEAR to cause the lag.

Here’s how I know it has to do with my IQueryable as the binding source:

Old code:

  1. Call a stored procedure using SqlCommand and use SqlAdapter to fill a new DataTable.
  2. The DataTable would be sent into a method for each DropDownList. (There are 5 DDLs)
  3. Each method would feed the rows of the DataTable (yes, each of them) into an IEnumerable.
  4. Multiple LINQ queries would be run against the IEnumerable to filter out the options we wanted, including a .Distinct(IEqualityComparer) and .Sort(x => x[“RowName”]); (Again, each of the methods would perform this).
  5. A new DataTable would be created via IEnumerable.CopyToDataTable() (Yes, again, each method)
  6. The DropDownList.DataSource would be set to the new DataTable, and would then .DataBind().

This horrible travesty of a code would finish very quickly in IE. Perhaps a second or two of think time.

Here’s the new code, in the flesh:

IQueryable<Expose_LotRuns> elr = DB.Expose_LotRuns;

if (iTechID > 0)
    elr = elr.Where(x => x.Master_LotRuns.Flows.CD_Techs.ID == iTechID);

if (iFlowID > 0)
    elr = elr.Where(x => x.Master_LotRuns.Flows.ID == iFlowID);

if (iToolID > 0)
    elr = elr.Where(x => x.Master_LotRuns.Tools.ID == iToolID);

if (iOperationID > 0)
    elr = elr.Where(x => x.Master_LotRuns.Operations.ID == iOperationID);

if (iReticleID > 0)
    elr = elr.Where(x => x.Reticles.ID == iReticleID);

var techs = from x in elr
                        where (x.Master_LotRuns.Flows.CD_Techs != null)
                        group x by new
                        {
                            x.Master_LotRuns.Flows.CD_Techs.ID,
                            x.Master_LotRuns.Flows.CD_Techs.Technology
                        } into y
                        orderby y.Key.Technology
                        select new { y.Key.ID, y.Key.Technology };

var flows = from x in elr
                        //where (x.Master_LotRuns.Flows != null)
                        group x by new
                        {
                            x.Master_LotRuns.Flows.ID,
                            x.Master_LotRuns.Flows.Flow
                        } into y
                        orderby y.Key.Flow
                        select new { y.Key.ID, y.Key.Flow };

var tools = from x in elr
                        //where (x.Master_LotRuns.Tools != null)
                        group x by new
                        {
                            x.Master_LotRuns.Tools.ID,
                            x.Master_LotRuns.Tools.Tool
                        } into y
                        orderby y.Key.Tool
                        select new { y.Key.ID, y.Key.Tool };

var ops = from x in elr
                    //where (x.Master_LotRuns.Operations != null)
                    group x by new
                    {
                        x.Master_LotRuns.Operations.ID,
                        x.Master_LotRuns.Operations.Operation
                    } into y
                    orderby y.Key.Operation
                    select new { y.Key.ID, y.Key.Operation };

var rets = from x in elr
                     //where (x.Reticles != null)
                     group x by new { x.Reticles.ID, x.Reticles.Reticle } into y
                     orderby y.Key.Reticle
                     select new { y.Key.ID, y.Key.Reticle };

ddlTechs.DataTextField = "Technology";
ddlTechs.DataValueField = "ID";
ddlTechs.DataSource = techs;
ddlTechs.DataBind();
ddlTechs.Items.Insert(0, new ListItem("Any", "0"));

ddlFlows.DataTextField = "Flow";
ddlFlows.DataValueField = "ID";
ddlFlows.DataSource = flows;
ddlFlows.DataBind();
ddlFlows.Items.Insert(0, new ListItem("Any", "0"));

ddlTools.DataTextField = "Tool";
ddlTools.DataValueField = "ID";
ddlTools.DataSource = tools;
ddlTools.DataBind();
ddlTools.Items.Insert(0, new ListItem("Any", "0"));

ddlOpers.DataTextField = "Operation";
ddlOpers.DataValueField = "ID";
ddlOpers.DataSource = ops;
ddlOpers.DataBind();
ddlOpers.Items.Insert(0, new ListItem("Any", "0"));

ddlReticles.DataTextField = "Reticle";
ddlReticles.DataValueField = "ID";
ddlReticles.DataSource = rets;
ddlReticles.DataBind();
ddlReticles.Items.Insert(0, new ListItem("Any", "0"));

Now, if you’ll watch the following video, you’ll see that the code above works very well in both Firefox and Chrome, and yet it blows in MS IE. Normally I’d be happy with it because I don’t use IE, but IE is company policy. It’s also worth mentioning that the lag only happens for the FIRST DDL, but not any of the subsequent selections. Also, the initial load (which loads all data, not limited at all, using the same methods) does not take this long to load either.

http://www.youtube.com/watch?v=-3QyNj87BSQ

Some please, PLEASE tell me why IE behaves like this, and what I can do to fix it. BTW, it works just as badly in IE7 and IE8

  • 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-13T10:27:48+00:00Added an answer on May 13, 2026 at 10:27 am

    First off, there is nothing wrong in the code you’ve included in the question in this context as it doesn’t run in IE. It has to do with the ASP.NET UpdatePanel postback code which sometimes has issues in IE particularly with dropdowns with many rows. See this.

    To debug issues like this, you can attach a Profiler (IE8 has one) and see which function is taking a long time to execute. If you also attach a network monitor such as HTTPWatch or Fiddler, you can find out how much time the server is taking to respond. In this case, I highly doubt the server time is the problem.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to render a haml file in a javascript response like so:
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into

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.