Domanda

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

È stato utile?

Soluzione

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

ResourceBasedLiteralControl and why it exists

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top