Asp.net ÖÐGridView¸÷ÖÖÓ÷¨
1.GridViewÎÞ´úÂë·ÖÒ³ÅÅÐò£º
Ч¹ûͼ£º
1.AllowSortingÉèΪTrue£¬aspx´úÂëÖÐÊÇAllowSorting="True"£»
2.ĬÈÏ1Ò³10Ìõ£¬Èç¹ûÒªÐÞ¸ÄÿҳÌõÊý£¬ÐÞ¸ÄPageSize¼´¿É£¬ÔÚaspx´úÂëÖÐÊÇPageSize="12"¡£
3.ĬÈϵÄÊǵ¥ÏòÅÅÐòµÄ£¬ÓÒ»÷GridViewµ¯³ö“ÊôÐÔ”£¬Ñ¡ÔñAllowSortingΪTrue¼´¿É¡£
2.GridViewÑ¡ÖУ¬±à¼£¬È¡Ïû£¬É¾³ý£º
Ч¹ûͼ£º
ºǫ́´úÂ룺
Äã¿ÉÒÔʹÓÃsqlhelper,±¾ÎÄûÓᣴúÂëÈçÏ£º
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
//ÇåÇåÔ¶ùhttp://blog.csdn.net/21aspnet
SqlConnection sqlcon;
SqlCommand sqlcom;
string strCon = "Data Source=(local);Database=Êý¾Ý¿âÃû;Uid=ÕʺÅ;Pwd=ÃÜÂë";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
bind();
}
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
bind();
}
//ɾ³ý
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
string sqlstr = "delete from ±í where id='" + GridView1.DataKeys[e.RowIndex].Value.ToString() + "'";
sqlcon = new SqlConnection(strCon);
sqlcom = new SqlCommand(sqlstr,sqlcon);
Ïà¹ØÎĵµ£º
ÔÚÈí¼þ¿ª·¢ÖУ¬°ÑÊý¾Ý´ÓÒ»¸öµØ·½¸´ÖƵ½ÁíÒ»¸öµØ·½ÊÇÒ»¸öÆÕ±éµÄÓ¦Óá£
Ôںܶ಻ͬµÄ³¡ºÏ¶¼»áÖ´ÐÐÕâ¸ö²Ù×÷£¬°üÀ¨¾Éϵͳµ½ÐÂϵͳµÄÒÆÖ²£¬´Ó²»Í¬µÄÊý¾Ý¿â±¸·ÝÊý¾ÝºÍÊÕ¼¯Êý¾Ý¡£ ASP.NET
2.0ÓÐÒ»¸öSqlBulkCopyÀ࣬Ëü¿ÉÒÔ°ïÖúÄã´Ó²»Í¬µÄÊý¾ÝÔ´¸´ÖÆÊý¾Ýµ½SQL SERVERÊý¾Ý¿â¡£
±¾ÎÄÖÐÎÒ½«Ê¾·¶SqlBulkCopyÀàµÄ²»Í¬Ó¦Óá£
Êý¾Ý¿âÉè ......
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
¡¡¡¡2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1 ......
Õâ´ÎÔÚÏîÄ¿ÖУ¬Óõ½ÁË´óÎļþÉÏ´«£¬ÒªÉÏ´«µÄÎļþÓÐ100¶àm£¬ÓÚÊÇÑо¿ÏÖÔÚ¹úÄÚʹÓõĴóÎļþÉÏ´«µÄ
×é¼þ·¢ÏÖÓõıȽ϶àµÄÓÐÁ½¸ö¿Ø¼þAspnetUpload 2.0ºÍLion.Web.UpLoadModule£¬ÁíÍ⻹ÓÐ˼¹éÔÚËüµÄ²©
¿ÍÌÃÖÐËù˵µÄ°ì·¨ http://blog.joycode.com/saucer/archive/2004/03/16/16225.aspx
Á½¸ö¿Ø¼þµÄ·½·¨ÊÇ£ºÀûÓÃÒþº¬µÄHttpWork ......
ÏÈÉý¼¶ieµ½5.5°æÒÔÉÏ
1 ÏÂÔØÖÐÎÄ°æIE6:http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/ie6setup.exe
2 ÏÂÔØmdac°²×° Ö±½ÓÏÂÔØ2.8ÖÐÎÄ°æ:http://download.microsoft.com/download/8/b/6/8b6198c0-fe96-4811-9d81-
d5c76dd5fea8/MDAC_TYP.EXE
3 È»ºóÏÂÔØ.NET Framework 1.1°æ¿ÉÔ ......
treeview.aspxÖдúÂëÈçÏ£º
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="treeview.aspx.cs" Inherits="treeview" %>
<!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 ......