asp.net GridView Ó¦ÓÃ
1£ºGridView Ìí¼ÓÊôÐÔ£¨ÊÇ·ñɾ³ý£¬Êó±ê¾¹ý±³¾°£©
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#6699f0'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");
}
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton l = (LinkButton)e.Row.FindControl("LinkButton1");
l.Attributes.Add("onclick", "javascript:return confirm('ÄãÈ·ÈÏҪɾ³ýÂð?')");
}
}
2£ºGridView·ÖÒ³
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
Inata();
}
3£ºgridView ÖмӸöHtmlÀàÐ͵Ächeckbox£¬ÓÃjs¿ØÖÆÈ«Ñ¡
<script language="javascript" type="text/javascript">
function GetAllCheckBox(CheckAll)
{
var items = document.getElementsByTagName("input");
for(i=0; i<items.length;i++)
{
if(items[i].type=="checkbox")
{
items[i].checked = CheckAll.checked;
}
}
}
</script>
<HeaderTemplate>
Ïà¹ØÎĵµ£º
ÔÚÓÃVS2008µ÷ÊÔÍøÕ¾µÄʱºò£¬Í»È»Ò³Ãæ²»ÄÜÕý³£ÏÔʾÁË£¬IEÏÔʾ“ÎÞ·¨ÏÔʾ¸ÃÍøÒ³”¡£
Ö¢×´Ò»£º
¡¡¡¡IEµØÖ·À¸ÀïÃæÏÔʾµÄ¶Ë¿ÚºÅºÍ×ÀÃæÈÎÎñÀ¸ÓÒϽǓASP.NET Development Server”µÄ¶Ë¿Ú²»Ò»Ö£¬¶ø°ÑIEµØÖ·À¸µÄ¶Ë¿ÚºÅ¸Ä³É“ASP.NET Development Server”ÏÔʾµÄ¶Ë¿ÚºÅ£¬½á¹ûÍøÒ³¾ÍÄܳöÀ´¡£
½â¾ö ......
ASP.NET 2.0·þÎñÆ÷¿Ø¼þ¿ª·¢----¿Ø¼þÉúÃüÖÜÆÚ
·þÎñÆ÷¿Ø¼þÉúÃüÖÜÆÚ¼ò½é
¡¡¡¡·þÎñÆ÷¿Ø¼þµÄÉúÃüÖÜÆÚÊÇ´´½¨·þÎñÆ÷¿Ø¼þ×îÖØÒªµÄ¸ÅÄî¡£×÷Ϊ¿ª·¢ÈËÔ±£¬±Ø
Ðë¶Ô·þÎñÆ÷¿Ø¼þÉúÃüÖÜÆÚÉî¿ÌÀí½â¡£µ±È»£¬Õâ²»ÊÇÒ»³¯Ò»Ï¦¾Í¿ÉÒÔ×öµ½µÄ¡£¶ÔÓÚ
ѧϰ¿Ø¼þ¿ª·¢¼¼ÊõµÄ³õѧÕߣ¬¿ÉÒÔ²»±ØÕÆÎյ÷dz£ÏêϸÉîÈ룬ֻÐè¶Ô·þÎñÆ÷¿Ø¼þ
µÄÉúÃüÖÜ ......
ÍøÒ³ÖгöÏÖ“'sys' 䶨Òå
”»ò“'Sys' is undefined”µÄ´íÎó¡£
´ËʱÎÒÃÇÒª×öµÄÊÇÔÚ web.config
ÖÐ <system.web> Ò»½ÚÏÂÃæÌí¼ÓÀàËÆ
ÈçÏÂÄÚÈÝ£º
<httpHandlers>
<add
verb="GET,HEAD" path="ScriptResource.a ......
¶ÏµãÐø´«µÄÔÀí
ÔÚÁ˽âHTTP¶ÏµãÐø´«µÄÔÀí֮ǰ£¬ÏÈÀ´ËµËµHTTPÐÒ飬HTTPÐÒéÊÇÒ»ÖÖ»ùÓÚtcpµÄ¼òµ¥ÐÒ飬·ÖΪÇëÇóºÍ»Ø¸´Á½ÖÖ¡£ÇëÇóÐÒéÊÇÓÉ¿Í»§»ú(ä¯ÀÀÆ÷)Ïò·þÎñÆ÷(WEB SERVER)Ìá½»ÇëÇóʱ·¢Ëͱ¨ÎĵÄÐÒé¡£»Ø¸´ÐÒéÊÇÓÉ·þÎñÆ÷(web server)£¬Ïò¿Í»§»ú(ä¯ÀÀÆ÷)»Ø¸´±¨ÎÄʱµÄÐÒé¡£ÇëÇóºÍ»Ø¸´ÐÒ鶼ÓÉÍ·ºÍÌå×é³É¡£Í·ºÍÌåÖ® ......
Ë®ÏÉ»¨Êý£ºÒ»¸öÈýλÕûÊý¸÷λÊý×ÖµÄÁ¢·½ºÍµÈÓÚ¸ÃÊý±¾Éí¾Í³Æ¸ÃÊýΪˮÏÉ»¨Êý£¬Ë®ÏÉ»¨Êý¹²ÓÐ4¸ö£¬·Ö±ðΪ£º153¡¢370¡¢371¡¢407( ÀýÈ磺1^3 + 5^3 + 3^3 = 153 )¡£ÎÒдµÄ´úÂëÈçÏ£¬ÄãÓÐÆäËûµÄʵÏÖ´úÂëÒ²¿ÉÒÔ·¢±íÆÀÂÛ¡£
int i, m,n,k;
for (i = 100; i < 1000; i++)
{
//È¡µÃ°ÙλÊý
m = i / 100;
//È¡µ ......