asp.net °ó¶¨GridView
ǰ̨ aspx Îļþ:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="List.aspx.cs" Inherits="List" %>
<!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" >
<head id="Head1" runat="server">
<title></title>
<link href="css.css" mce_href="css.css" rel="stylesheet" type="text/css" />
<mce:script language="javascript" type="text/javascript"><!--
function disOpen(c)
{
var xposition=0;
var yposition=0;
var width=600;
var height=550;
var url=c;
url=url+"?pagesize="+document.forms(0).hidpagesize.value;
if ((parseInt(navigator.appVersion) >= 4 ))
{
xposition = (screen.width - width) / 2;
yposition = (screen.height - height) / 2;
}
var theproperty= "width=" + width + ","
+ "height=" + height + ","
+ "location=0,"
+ "menubar=0,"
+ "resizable=1,"
+ "scrollbars=1,"
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + ","
+ "screeny=" + yposition + ","
+ "left=" + xposition + ","
+ "top=" + yposition;
window.open(url,null,theproperty );
}
function DEL(N)
{
if(window.confirm("Are you sure you wish to delete?")==true)
{
document.forms(0).hidID.value = N;
document.forms(0).hidopMode.value = "1";
document.forms(0).submit();
}
}
function CheckMsg()
{
if(document.forms(0).hidsysMsg.value.length!=0)
{
alert(docu
Ïà¹ØÎĵµ£º
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection conn;
SqlCommand cmd1, cmd2;
SqlTransaction tra;
conn = new SqlConnection("server=.;database=test;uid=sa;pwd=123");
conn.Open();
tra = conn.BeginTransaction();//¿ªÊ¼ÊÂÎ ......
ºÃ¾ÃûÓÐд¼¼ÊõÎÄÕÂ,Èç¹û´ó¼Ò¿´²»Ã÷°×,¾Í¶à¿´¼¸Æª,º¹,»òÕß,ÔÚÎÄÕµĺóÃæ»Ø¸´(ÕâÊÇ×îÓÐЧµÄ°ì·¨),ÎһᾡÁ¦°ïÖú´ó¼Ò½â´ðÒÉ»ó.
À´ÕÒÕâÆªÎÄÕµÄ,Ó¦¸Ã¶¼ÖªµÀʲô½Ð¶þ¼¶ÓòÃû°É,·Ï»°¾Í²»ËµÁË.µ«ÊÇÌÖÂÛǰ,ÏÈÒªÃ÷°×Ò»¸ö˼ÏëÎÊÌâ.
ºÜ¶àÅóÓÑÒ»Ö±¿¼ÂDz»Çå(ÎÒǰ¼¸ÌìÒ²Ò»Ö±¸ã²»Ã÷°×)µÄÎÊÌâÊÇ,ÎÒ¼üÈëÒ»¸öµØÖ·ºó,ÔõôÕâ¸öurl¾Í±»ÖØÐ´ÁË?
......
×î½üÓиöÅóÓÑÒª×öurlÖØÐ´µÄ¶«Î÷,ÎÒ°ïËûŪÁËŪ,»ØÍ·¿´µ±Äê×Ô¼ºÐ´µÄÄǸöÎÄÕÂ,µ±Ê±ÒÔΪ×Ô¼ºÐ´µÄºÜÈÝÒ×Àí½â.µ«ÏÖÔÚÔÙ¿´È´¾õµÃдµÄ²»ºÃ.¶ø½ñÌì°Ù¶ÈÁËÒ»ÏÂurlrewriter·¢ÏÖÎÒÕâ¸öÎÄÕ¾¹È»Åŵڶþ.ΪÁË·½±ã¸ü¶àÅóÓÑ,ÎÒÔÙдµã¶«Î÷²¹³äÏÂ.
Ò»°ãÓðٶÈËѵÄÅóÓѶ¼ÊǶÔÕâ¸ö²»Á˽⵫ÓÖ¼±ÐèÒªÓõÄ,ÎÒÏë,ÔÙ¶àµÄÓïÑÔÒ²±È²»¹ýÒ»¾ä´úÂë.ÓÚÊÇÎÒ° ......
×îÖÕЧ¹ûÈçÏÂͼ£º
-----------------------------------------------------------------------------------------------
Ñùʽ²¿·Ö£º
<style type="text/css">
.anpager .cpb
{
& ......
1.´úÂëºóÖÃ
´úÂëºóÖÃÊÇ΢ÈíµÄÒ»Ïî¼¼Êõ£¬Ò²ÊÇÎÒÃDZàдASP.NET³£ÓõıàÂ뷽ʽ¡£¾ßÌ巽ʽ¾ÍÏñÒ³ÃæÎļþ(.aspx)ºÍ´úÂëÎļþ(.cs)Á½¸öÎļþÏ໥¹ØÁª
Ëù¹¹³ÉµÄÒ³Ãæ¡£Ò»±ßÇé¿öÏ£¬.aspxÎļþÖÐûÓдúÂë¡¢Ö»ÓпռäºÍHTML´úÂ룬¶ø.csÎļþÖбàдÏà¹ØµÄ´úÂë²Ù×÷¡£
ÕâÑù×öµÄºÃ´¦¾ÍÊÇ£ºÊ¹´úÂëÓëÒ³ ......