1

嗨,我创建了一个 Web 应用程序,在该应用程序中我遇到了性能问题,因为我在 itemdatabound 上的转发器内绑定了 15 个用户控件,并且我正在使用用户控件的 prerender 事件来绑定数据,您能否建议我对此的任何替代方案

if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
    DataRowView row = e.Item.DataItem as DataRowView;
    HomePhought uxHomePhought = (HomePhought)e.Item.FindControl("uxHomePhought");
    HomeConnection uxHomeConnection = (HomeConnection)e.Item.FindControl("uxHomeConnection");
    HomeTestimonialPublished uxHomeTestimonial = (HomeTestimonialPublished)e.Item.FindControl("uxHomeTestimonial");
    HomeProfileEdit uxHomeProfileEdit = (HomeProfileEdit)e.Item.FindControl("uxHomeProfileEdit");
    HomeMemex uxHomeMemex = (HomeMemex)e.Item.FindControl("uxHomeMemex");
    HomeInterestMemex uxHomeInterestMemex = (HomeInterestMemex)e.Item.FindControl("uxHomeInterestMemex");
    HomeMemexPhought uxHomeMemexPhought = (HomeMemexPhought)e.Item.FindControl("uxHomeMemexPhought");
    //HomeBFFTips uxHomeBFFTip = (HomeBFFTips)e.Item.FindControl("uxHomeBFFTip");
    HomePageCreate uxHomePageCreate = (HomePageCreate)e.Item.FindControl("uxHomePageCreate");
    HomePageHiveFive uxHomePageHiveFive = (HomePageHiveFive)e.Item.FindControl("uxHomePageHiveFive");
    HomePageNewsAdd uxHomeBusinessNewsAdd = (HomePageNewsAdd)e.Item.FindControl("uxHomeBusinessNewsAdd");
    HomePageNewsComment uxHomePageNewsComment = (HomePageNewsComment)e.Item.FindControl("uxHomePageNewsComment");
    HomePageNewsHighFive uxHomePageNewsHighFive = (HomePageNewsHighFive)e.Item.FindControl("uxHomePageNewsHighFive");
    HomeMedalAchieved HomeMedalAchieved1 = (HomeMedalAchieved)e.Item.FindControl("HomeMedalAchieved1");

    ...................
    ...................
    //  Binding user controls
    ...................
    ...................

}
4

0 回答 0