سؤال

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top