-1

Suppose i have many dropdownlist in my aspx page and every dropdownlist is connected to database.

So what approach that i uses for the page_load. Any Suggestion?

I am using ASP.Net C# with SQL Server 2008.

user3441151
  • 1,625
  • 4
  • 23
  • 64

2 Answers2

0

If dropdownlists does not depends on other dropdownlists selected value then Best way as per my suggestion is that you create One stored procedure with All select querys for binding dropdownlist and from codebehind fill it into dataset then bind datatable in dataset to appropriate dropdownlist.

Its just my suggestion because as per what i know is store procedure are faster and in this way you only need to call one store procedure.

ALOK
  • 553
  • 6
  • 17
0

Depending on your requirements, I can think of different ways to improve the page load performance

  1. If values in your dropdownlists do not matter on the initial page state, you can defer binding of the controls
  2. If there are a lot items in each dropdownlist you can make use of autocomplete or load-on-demand
  3. Output Cache
  4. On the data side, you can use sqlcachedependency for data that do not change that often
seven21
  • 124
  • 1
  • 8