简体   繁体   中英

ASP.NET Server is showing different result that in my developer machine?

Can someone please explain reason behind this issue. I am using telerik RadListView.

Here is the code

protected void radlistview_ItemDataBound(object sender, RadListViewItemEventArgs e)
        {
            try
            {
                if (e.Item is RadListViewDataItem)
                {
                    var item = (RadListViewDataItem)e.Item;
                    var dataitem = item.DataItem;
                    if (dataitem == null) return;
                    t = new StringBuilder();
                    foreach (var clt in item.Controls)
                    {
                        t.AppendLine(clt.GetType().FullName + " - ");
                    }
                    Session["EcnLoadError"] = t.ToString();
                    ShowErrorAndExit();
                }
            }
            catch (Exception ex)
            {
                Session["EcnLoadError"] = ex.ToString();
                ShowErrorAndExit();
            }            
        }

My developer machine gives me the following result,

System.Web.UI.LiteralControl - 
System.Web.UI.LiteralControl - 
System.Web.UI.WebControls.Image - 
System.Web.UI.LiteralControl - 
System.Web.UI.LiteralControl - 
System.Web.UI.WebControls.LinkButton - 
System.Web.UI.DataBoundLiteralControl - 

But after deploying to server it gives me the following,

System.Web.UI.ResourceBasedLiteralControl - 
System.Web.UI.WebControls.Image - 
System.Web.UI.ResourceBasedLiteralControl - 
System.Web.UI.WebControls.LinkButton - 
System.Web.UI.DataBoundLiteralControl - 

Your help is greatly appreciated.

Thanks

If the rendered output of LiteralControl is more than 255 bytes, ResourceBasedLiteralControl is used for efficiency.

ResourceBasedLiteralControl and why it exists

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM