#region 创建查询列表
/// <summary>
/// Creates html table to hold passed in feature info, and stream back to client.
/// </summary>
/// <param name="ftr">feature object</param>
private void CreateSearchList(IResultSetFeatureCollection ifs)
{
//create a table control and populat it with the column name/value(s) from the feature returned and
// and the name of the layer where the feature belong
System.Web.UI.WebControls.Table infoTable = new System.Web.UI.WebControls.Table();
//set table attribute/styles
infoTable.CellPadding = 4;
infoTable.Font.Name = "Arial";
infoTable.Font.Size = new FontUnit(8);
infoTable.BorderWidth = 1;
//infoTable.BorderStyle = BorderStyle.Outset; System.Drawing.Color backColor = Color.Bisque; //add the first row, the layer name/value where the selected feature belongs
TableRow r = new TableRow();
TableCell c = new TableCell(); foreach (Feature ftr in ifs)
{ r = new TableRow();
r.BackColor = backColor; r.Cells.Clear();
c = new TableCell();
var mask = document.createElement("div"); c.Text = "● " + ftr["Name"].ToString();
c.Font.Bold = true;
c.ForeColor = Color.RoyalBlue; r.Cells.Add(c); infoTable.Rows.Add(r); } //stream the html table back to client
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
infoTable.RenderControl(hw);
String strHTML = sw.ToString();
HttpContext.Current.Response.Output.Write(strHTML);
} #endregion
/// <summary>
/// Creates html table to hold passed in feature info, and stream back to client.
/// </summary>
/// <param name="ftr">feature object</param>
private void CreateSearchList(IResultSetFeatureCollection ifs)
{
//create a table control and populat it with the column name/value(s) from the feature returned and
// and the name of the layer where the feature belong
System.Web.UI.WebControls.Table infoTable = new System.Web.UI.WebControls.Table();
//set table attribute/styles
infoTable.CellPadding = 4;
infoTable.Font.Name = "Arial";
infoTable.Font.Size = new FontUnit(8);
infoTable.BorderWidth = 1;
//infoTable.BorderStyle = BorderStyle.Outset; System.Drawing.Color backColor = Color.Bisque; //add the first row, the layer name/value where the selected feature belongs
TableRow r = new TableRow();
TableCell c = new TableCell(); foreach (Feature ftr in ifs)
{ r = new TableRow();
r.BackColor = backColor; r.Cells.Clear();
c = new TableCell();
var mask = document.createElement("div"); c.Text = "● " + ftr["Name"].ToString();
c.Font.Bold = true;
c.ForeColor = Color.RoyalBlue; r.Cells.Add(c); infoTable.Rows.Add(r); } //stream the html table back to client
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
infoTable.RenderControl(hw);
String strHTML = sw.ToString();
HttpContext.Current.Response.Output.Write(strHTML);
} #endregion
解决方案 »
- 各位大侠查询结果生成list<t>与dataTable哪个效率高?
- mschart柱状图应用问题!急
- 页面嵌入
- 急 有关水晶报表打印问题
- 关于WebChart控件的问题,大侠们快来看看吧!
- 用 Aspose.Excel.dll 组件开发 excel功能的文档。在客户端浏览时,会弹出“帐号,密码”验证的提示框?有谁遇到过?
- 请问用DataList 可以在不通过url传递参数(例如Page Number)的情况下实现分页么???
- 我做了一个图片上传的程序,别的图片都能上传,只有JPG不能,还出错
- DataRow的小问题
- 能不能在HyperlinkColumn的URL格式化字符串里传送两个绑定的字段值?
- 请教大家一个关于AjaxPro.Utility.RegisterTypeForAjax(typeof(命名空间.类名))的问题
- html编辑器的预览功能怎么实现
[email protected]