RenderText() public method

Cancels the view processing and writes the specified contents to the browser
public RenderText ( IFormatProvider formatProvider, string contents ) : void
formatProvider IFormatProvider
contents string
return void
		/// <summary>
		/// Implementors should perform the action 
		/// upon this invocation
		/// </summary>
		/// <param name="controller"></param>
		public void Execute(Controller controller)
		{
			controller.RenderText("Hello from save dynamic action");
		}
            public void Execute(Controller controller)
            {
                int start = int.Parse(controller.Params["start"]);
                int limit = int.Parse(controller.Params["limit"]);

                TabularQuery query = TabularQuery.Find(int.Parse(controller.Params["table"]));
                CustomQuery customQuery = new CustomQuery(query.SelectStatement);
                customQuery.Logger = GlobalApplication.CreateLogger(typeof(CustomQuery));

                QueryResults results = customQuery
                    .StartAtRow(start)
                    .LimitResultsTo(limit)
                    .ConfigureFilters(controller.Params)
                    .Execute();

                ArrayList rows = new ArrayList(results.Rows.Count);
                foreach (object[] row in results.Rows)
                {
                    Hashtable attributes = new Hashtable(results.Columns.Length);
                    for (int i = 0; i < results.Columns.Length; i++)
                    {
                        attributes[results.Columns[i]] = row[i];
                    }
                    rows.Add(attributes);
                }

                controller.Context.Response.ContentType = "text/javascript";
                controller.RenderText(
                    "{ results: " +
                    results.TotalRowCount.ToString() +
                    ", rows: " +
                    JavaScriptConvert.SerializeObject(rows) +
                    " }"
                );
            }