コード例 #1
0
        // Render twitter status from template and render it
        string RenderStatus(TwitterStatus status)
        {
            // try search if contains any eval scripts
            var html = RenderEvalScripts(_twitter.StatusTemplate, status);

            // render control directly if template not contains eval scripts
            if (String.IsNullOrEmpty(html))
            {
                var pHolder = new ListViewDataItem(0, 0)
                {
                    DataItem = status
                };
                _twitter.StatusTemplate.InstantiateIn(pHolder);
                pHolder.DataBind();
                html = RenderControl(pHolder);
            }

            return(html);
        }