/// <summary>
        /// Render twitter status from template and render it
        /// </summary>
        /// <param name="status"></param>
        /// <returns></returns>
        private 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;
        }
        /// <summary>
        /// Search eval scripts in template and render it with appropriate values from status.
        /// If template doesn't contains eval scripts, it will returns null.
        /// </summary>
        /// <param name="template">Template Target</param>
        /// <param name="status">Twitter Status</param>
        /// <returns>Returns null if no eval scripts</returns>
        private string RenderEvalScripts(ITemplate template, TwitterStatus status)
        {
            // search is there any eval scripts
            var tempHtml = PersistTemplate(template);
            var r1 = new Regex(@"(<%#) ?.*eval?.*%>", RegexOptions.IgnoreCase);
            var matches = r1.Matches(tempHtml);

            _valCounter = 0;
            _values = new List<string>();

            // manualy extract eval scripts if any
            if (matches.Count > 0) {
                var r2 = new Regex(@"""(.*?)""");
                foreach (var match in matches) {
                    var evalData = r2.Match(match.ToString()).ToString();
                    evalData = evalData.Substring(1, evalData.Length - 2);

                    object value = null;
                    if (evalData.Contains(".")) {
                        var props = evalData.Split(new string[] { "." }, StringSplitOptions.RemoveEmptyEntries);
                        var propVal1 = typeof(TwitterStatus).GetProperty(props[0]).GetValue(status, null);
                        if (propVal1 != null)
                            value = propVal1.GetType().GetProperty(props[1]).GetValue(propVal1, null);
                    } else {
                        value = typeof(TwitterStatus).GetProperty(evalData).GetValue(status, null);
                    }

                    if (value == null)
                        value = "[" + evalData + "]";

                    _values.Add(value.ToString());
                }

                var evaluator = new MatchEvaluator(FillStatusValue);
                return r1.Replace(tempHtml, evaluator);
            }

            return null;
        }
        /// <summary>
        /// Executes search query against the Twitter API
        /// </summary>
        /// <param name="search">The search query</param>
        /// <param name="count">The number of results to return</param>
        /// <returns></returns>
        public IList<TwitterStatus> GetSearch(string search, int count)
        {
            // Build query URL
            var sb = new StringBuilder();
            sb.AppendFormat(
                "http://search.twitter.com/search.atom?q={0}&rpp={1}",
                HttpUtility.UrlEncode(search),
                count
            );
            var queryUrl = sb.ToString();

            // Execute query
            var results = this.Query(queryUrl);

            // Parse results
            var defaultNS = "{http://www.w3.org/2005/Atom}";

            var statuses = new List<TwitterStatus>();
            var entries = from e in results.Descendants(defaultNS + "entry")
                          select e;

            foreach (var entry in entries) {

                var newUser = new TwitterUser {
                    Name = entry.Descendants(defaultNS + "name").FirstOrDefault().Value,
                    ProfileImageUrl = entry.Elements(defaultNS + "link")
                      .Where(link => (string)link.Attribute("rel") == "image")
                      .Select(link => (string)link.Attribute("href"))
                      .First()
                };

                var newStatus = new TwitterStatus {
                    CreatedAt = DateTime.Parse(entry.Element(defaultNS + "published").Value),
                    Text = entry.Element(defaultNS + "content").Value,
                    User = newUser
                };

                statuses.Add(newStatus);

            }

            return statuses.ToList();
        }