asp.net ³ÌÐò¶¯Ì¬Ìí¼Ógridview
ǰ̨:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div id="divshow" runat="server" >
</div>
</form>
</body>
</html>
ºǫ́£º
GridView gvshow=null;
public void setBind()
{
DataTable dt = getDataTable(); //»ñµÃÊý¾ÝÔ´
gvshow = new GridView();
gvshow.Width = Unit.Pixel(800);
gvshow.AutoGenerateColumns = false;
gvshow.RowDataBound += new GridViewRowEventHandler(gvshow_RowDataBind);
gvshow.RowDeleting +=new GridViewDeleteEventHandler(gvshow_RowDeleting);
gvshow.DataSource = dt;
for (int i = 0; i < dt.Columns.Count; i++)
{
BoundField bc = new BoundField();
bc.DataField = dt.Columns[i].ColumnName.ToString();
for (int i = 0; i < dt.Columns.Count; i++)
{
BoundField bc = new BoundField();
bc.DataField = dt.Columns[i].ColumnName.ToString();
&
Ïà¹ØÎĵµ£º
»¶Ó½øÈë.NETÉçÇøÂÛ̳£¬Óë200Íò¼¼ÊõÈËÔ±»¥¶¯½»Á÷ >>½øÈë
ASP.NET Êý¾Ý¿Ø¼þ:GridView,DataList,Repeater ,DetailsView,FormView¡£
ASP.NET Êý¾Ý¿Ø¼þ×ÛÊö£º
1.Ç°3¸öÓÃÓÚ³ÊÏÖ¶àÌõ¼Ç¼,ºóÃæ2¸öÓÃÓÚ³ÊÏÖµ¥ÌõÊý¾ÝÃ÷ϸ,¼´³£ÓõļǼÃ÷ϸ¡£
2.GridViewºÍDetailsView¿Ø¼þµÄ²¼¾Ö¹Ì¶¨,×Ô¶¨ÒåÊý¾ÝÏÔʾµÄ²¼¾Ö¹¦ÄÜÓÐÏÞ,Ò»°ã ......
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
< ......
ÎÄÕ³ö´¦£ºhttp://hi.baidu.com/richiezheng/blog/item/8bb94b8692315b3867096efa.html
ÀûÓÃASP.NET¼¼Êõ¶¯Ì¬Éú³ÉHTMLÒ³Ãæ
˼·
¡¡¡¡1. ÀûÓÃÈçDw-MxÕâÑùµÄ¹¤¾ßÉú³Éhtml¸ñʽµÄÄ£°å£¬ÔÚÐèÒªÌí¼Ó¸ñʽµÄµØ·½¼ÓÈëÌØÊâ±ê¼Ç(Èç$htmlformat$),¶¯Ì¬Éú³ÉÎļþʱÀûÓôúÂë¶ÁÈ¡´ËÄ£°å£¬È»ºó»ñµÃǰ̨ÊäÈëµÄÄÚÈÝ£¬Ìí¼Óµ½´ËÄ£°åµÄ±ê¼ÇλÖÃÖ ......
ÎÄÕ³ö´¦£ºhttp://www.cnblogs.com/tomcat112906/articles/922639.html
ASP.NETµÄHTMLTableÔÑùµ¼³öµ½Excel
js´úÂë £º function PrintTableToExcelEx(objTab)
{
&nbs ......
ÏȽ¨¸öhtmlÄ£°æÒ³(template.htm)£º
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>$title</title>
& ......