本文介绍了绑定下拉菜单会增加页面加载时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用asp.net和sql server.
我将下拉列表绑定到tbl_item.
tbl_item包含15627行.

当我点击页面加载时,大约需要3到5分钟即可加载页面...

是否有其他方法可以绑定下拉菜单,以便在几秒钟内加载页面.
注意:我正在使用telerik下拉控件.

我的代码:

Hi

I am working with asp.net and sql server.
I am binding dropdown to tbl_item.
tbl_item contain 15627 rows.

when i click on page load, it take approx. 3 to 5 min to load page...

Is there any different approch to bind dropdown so that within fraction of seconds page get loaded.
To note: i am using telerik dropdown control.

My code :

Dim str As String = "SELECT [item_code], [auto_id], [description], [pk_qty] from [tbl_item]"
Dim myadp As SqlDataAdapter = New SqlDataAdapter(str, conn)
Dim myds As New DataSet
myadp.Fill(myds)
With drpitem_code
    .DataTextField = myds.Tables(0).Columns("item_code").ToString
    .DataValueField = myds.Tables(0).Columns("auto_id").ToString
    .DataSource = myds
    .DataBind()
    .Items.Insert(0, New Telerik.WebControls.RadComboBoxItem("SELECT"))
End With



非常感谢您的任何帮助



Any help is greatly appreciated

推荐答案



这篇关于绑定下拉菜单会增加页面加载时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-28 00:41