破英文天天看

<Script runat="Server">
    Public  string Name
{
       get
       { return this.TextBox1.Text;}

}
</Script> 

runat="Server" PostBackUrl="~EndPage.aspx"
 
<%@ Page Language="C#" %>
<%@ PreviousPageType VirtualPath="~/SourcePage.aspx" %>
PreviousPageType  属性 
<Script runat="Server">
    protected void Page_Load(object sender,EventArgs e)
{
          this.Lable1.Text=PreviiousPage.Name;
}

</Script>


中文在utf-8  是可变长度来存储 中是三个字节   闰面字符4个字节

<div contenteditable="true">s</div> 只能用hidden文本框动态存放div内容发送到后台接受
string str="中文123";
在winform中输出是 Console.WriteLine(str.Length);
Encoding gb=Encoding.GetEncoding("gb2312");
byte[] bytes=gb.GetBytes(str);
char[] chars=gb.GetChars(Bytes);//从字节按照gb2312得到字符数组
str=gb.GetString(Bytes);  //从字节按照gb2312得到unicode字符串
StreamWriter sw=new StreamWriter("1.txt");
sw.Write(chars);
StreamWriter sw2=new StreadmWriter("2.txt",false,gb)
sw2.Write(str);

Porfile配置信息
.net2.0为每个用户存储配制信息,
他是一个强类型与长期保存  与application 与session不一样呀.长期保存了
支持匿名用户,他配制存在Provider
<configuration>
<system.web>
<profile>
 <properties>
  <add name="Screennanme">
   <add name="posts" type="System.int32" defaultValue="0"/>
  

profile 一段时间可以清除数据库中的不房问的数据

成员服务Membership Service
四层结构 Membership Data   Membership Providers数据库提供都, MeibershipApI 访问API提供
ConTrols 有login LoginStatus  LoginView Other Login Controols

if(Mebership.Validateuser(userName.text,Password.Text))
  RedirectFromLoginPage(UserName.Text,RememberMe.Check.ed);
 用户认证与授权

 site Navigation  站点导航  模式与树形式的两种式样

 


#region

private void btn_ok_Click(object sender, System.EventArgs e)
{
 
}
#endregion
用来注释中间代码的作用 而且在其他地方用到中间的类和方法 都会有你标注的注释 本身不参与编译 还可以缩进代码 方便阅览

伪类:
 a:link    未被访问表示一link
 a:hover   鼠标悬停时
 a:active  在鼠标点击与释放之间发生的事件
 a:visited  链接地址已被访问过时
 a:focus{font-size:14;text-decoration:underline;}
 :first-letter {}首字
 :first-line {}
 :first-child{}
  p a:first-child { color: green }
table td:first-child { width:200px; }
 background-repeat:repeat  no-repeat repeat-x  repeat-y
 background-attachment:scroll  fixed  背景图像是随对象内容滚动还是固定的
 position 定位
 position static absolute  relative
 div { position: absolute; bottom: 1in; left: 1in; right: 1in; top: 1in; }
div { position:relative; top:-3px; left:6px; }
 relative :  对象不可层叠,但将依据left,right,top,bottom等属性在正常文档流中偏移位置
 layout 布局比较有用          async
 clear:left both right
 float:right  left
 overflow :visible hidden auto
 overflow-x: visible hidden auto scroll
 getElementByid("aa").style.display:block none
 Properties
 font
 text
 backgound
 margin
 padding
 border
 scrollbar

ul {
 list-style-type: none;
 list-style-image: url(images/bullet-2.gif);
 list-style-position: outside;
 line-height: 2.1em;
 vertical-align: middle;
 margin-left: 1.25em;
}
.link {
 list-style-image: url(images/bullet-1.gif);
}
 /* Login View */

.login .label {
 display:block;
}

.login .textbox {
 border: 1px solid #929292;
 width: 140px;
 vertical-align: middle;
 padding: 3px;
 margin: 2px 0 5px 0;
}

.login .button {
 display:block;
 margin-top:8px;
 margin-bottom:8px;
}
  
   {cursor:hand;border:1px solid black;font-family:arial;font-size:9pt;}
h1, h2, h3, h4 {
 margin: 0;
 font-family: 宋体, Tahoma, Arial, Helvetica, sans-serif;
}
p {
 line-height: 1.4em;
}
hr {
   border:0;
   border-top:1px solid #505050;
}

a {
 text-decoration: none;
 color: #DBB94F;
}           a

.footer
{
   backgroud-image:url(images/footer.gif);
   backgroud-repeat: no-repeat;
   margin-left: auto;
   margin-top: 0;
   padding-bottom:20px;
   width:770px;
   height:50px;
   text-align:center;
   font-size:12px;
   color:#ffffff;
}


UI layer
Access Layer
business layer

========================================================
 rowspan colspan
<%@ MasterType VirtualPath="Site.master" %>

ContentPlaceHolder
<%-- ContentPlaceHolder control --%>
<asp:contentplaceholder id="FlowerText" runat="server"/>

<%-- ContentPlaceHolder with default content --%>
<asp:contentplaceholder id="FlowerText" runat="server">
  <h3>Welcome to my florist website!</h3>
</asp:contentplaceholder>
Content 控件是内容页中的。专门重写母版页的内容占位符 ,Content 控件通过其 ContentPlaceHolderID 属性与特定的

ContentPlaceHolder 控件关联。
Style style = new Style();
        style.BorderColor = Color.Black;
        style.BorderStyle = BorderStyle.Dashed;
        style.BorderWidth = 1;

        MyLogin.ApplyStyle (style);
=============================================================

GetRecordsByCategory
ObjectInstance
ObjectDataSource  TypeName   SelectMethod  UpdateMethod  ControlParameter

ControlParameter

        OleDbDataAdapter oda = new OleDbDataAdapter();
        oda.SelectCommand=new OleDbCommand(que,con);
        DataSet ds = new DataSet();
        oda.Fill(ds,"thc");
        return ds.Tables["thc"];


gridView中有<column>集合
partial  部分的局部的
OleDbCommand cmd = new OleDbCommand(que,con);
        if (cmd.ExecuteScalar().ToString() != "")
            return true;
        else
            return false;
        con.Close();

obj.offsetParent.offsetTop + 18;
document.getElementById("Layer1").style.display = "block";
document.getElementById("layer1").style.display="none";

 

 

Gridview
DataSource
AutoGenerateColumns
BoundField
HeaderText
DataField
CheckBoxField
SqlDataSource
SelectCommand
UpdateCommand
InsertCommand
DeleteCommand
ConnectionString
configuration  构造
appSettings
connectionStrings
version
styleSheetTheme
caching
sqlCacheDependency
Enabled
Location.href
AdRotator
Advertisements
Impressions
FileUpload
LinkButton
RadioButtonList
HiddenField
Confirm
Detaile
EXecute
Repeater
Navigate
Generate
Alternation
Procedure
httphandlers
anonymous
Identification
authentication
authorization
Theme
Language
background-color
MasterType
VirtualPath
Principal
Import Namespace
Description
Property
Duration
Cultrue
ImageUrl
NavigaterUrl
summary
ValidationExpression
Convert
Register
Assembly=
TagPrefix=
IsValid

 ==========================================================================


控件名           简写      控件名                简写
Label           lbl          TextBox             txt
Button           btn          LinkButton            lnkbtn
ImageButton           imgbtn      DropDownList          ddl
ListBox          lst          DataGrid               dg
DataList            dl          CheckBox         chk
CheckBoxList       chkls         RadioButton       rdo
RadioButtonList      rdolt          Image       img
Panel           pnl          Calender      cld
AdRotator       ar          Table         tbl
RequiredFieldValidator   rfv          CompareValidator     cv
RangeValidator      rv         RegularExpressionValidator   rev
ValidatorSummary      vs          CrystalReportViewer    rptvew
<MembershipUserCollection GetAllUsers()>

<authorization>
<allow users="thc,thcjp,hehe"/>
<allow roles="admin"/>
<deny users="*"/>
<suthentication mode="Forms">

<%@ Control%>
<% @ Register Src="" tagName="aa" tagPrefix="uc"%>
Pagelet
用户控件接收参数:增加属性接收参数     pg.ascx

Passport
<aspL:Repeater ID="repeate2" runat="server" datasouce='<%# Eval("myrela")%>'>         这里myrela表示视图
<ItemTemplate>
<%# Eval("[ \"Title_id \"]") %> <br>
</ItemTemplate>
</asp:Repeater >

 

<asp:Repeater ID="Repeater1" runat="Server" OnItemdataBound="Repeater1_ItemDataBound">
<HeaderTemplate>
<table width="500">
<tr style="background-color:#ccffcc;">
<td>作者 </td><td>书籍 </td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td> <%# Eval("au_lname") %></td>
<td> <%# Eval("myrela")%> <td></td>
 </tr>
</ItemTemplate>

 

 

 

<AlernatinItemplate>


<HeaderTemplate>
<ItemTemplate>

<AlernatingItemplate>

SeparatorTemplate
<FooterTeamplate

Repeater   容器控件  简单的数据显示
Template Repater

ItemTemplate
AlternationgItemTemplate  交替显示

AlternatinItemTemplate

数据库读显,

 


GridView
Separator 分隔符
Alternating  替换项

DataList
ItemTemplate
必须最少定义一个 ItemTemplate

DetailsView
FormView
Repeater
SqlDataSource

 

 

 

 


控件叫做事件。。。自己做叫做方法....   在方法里定义属性  

用到SQL数据库应该引入一个命名空间  using System.Data.SqlClient

Portected
Protected void Page_Load(object sender ,EventArgs e)
{   
        if(!IsPostBack)
        {
          DataView dv=drv("Select * form big");
         foreach (DataRowView datav in dv)
          {
            TreeNode tn=new TreeNode();
            tn.Text=datav["title"].ToString();
            tn.Value=datav["bid"].ToString();
            tn.Expanded=false;
            TreeView1.Node.Add(tn)
            AddchildNodes(tn);//调用方法填充二级节点
           } 
         }
}

 

 

 

 

 


<siteMap >
 <siteMapNode url="" Title="" descript>(两个坚括号是有结点的呀。)
单独一个就比较元素

 

 

 

 


CheckBox2_CheckedChanged(object sender,EventArgs e)
{
  foreach(GridViewRow.gr in GridView1.Rows)
  {
     CheckBox chk=(CheckBox)gr.cells[6].FindControl("itemchk");
     if (!chk.Checked)
      {
        chk.Checked=true; 
      }    
     else
     {
       chk.Checked=false
     }
  }

}

 

 int Columns.

if(! ISpostBack)
{
  for ( int i=1 ;i<GridView1.Columns.Count;i++)
  {
   DropDowlist1.Items.Add(i.ToString());
  }
}


RowDataBund
RowCreated(object sender,GridViewRowEventArgs e)
  if(e.Row.RowType==DataControlRowType.DataRow)
{
  e.Row.Attributes.Add("onmouseover","c=this.style.backgroudColor;this.style.backColor='00ffee'")
  e.Row.Attributes.Add("onmouseout","this.style.backgroundColor=c")

}
 
Protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
  for( int i=0 ;i<GridView1.Rows.Count;i++)
  {
  string lbl=Convert.Tostring(DataBinder.Eval(e.rowDataItem,"state"));
     if (lbl="BB")
      {
       e.Row.BackColor=System.Drawing.Color.LimeGreen;
        }  
   }
 }


sitemappa
<siteMapNode url="default.asp" title="首页",description="点些返回首页">
 


Treeview

menu

主题与皮肤

App_Themes  文件夹下面主题

StylesheetThemes

 

 

label(Master.FindControL("Label1")).Text=DropDownList1.SelectedValue;

 


Wizard  向导步骤


 

 Protected void Buttion1_Click(object sender,EventArgs e)
{
    int rn=int.Parse(rows.SelectedValue);得到需要增加的行数
    int cn=int.Parse(cell.SelectedValue);得到需要的列数

 for (int i=1 ;i<=rn;i++)
 {
  TableRow tr=new TableRow();  申明一个表格行
    for(j=1;j<=cn;j++)
     {
      TableCell tc=new TableCell;申明表格的列
         if (i==1)
          {
          tc.Controls.Add(new LiteralControl("洪超大型"))
          }
      tr.Cells.Add(tc);
     
    Table1.RoW.Add(tr)
      
     }
      
 
  
  
 }


}


Substitution
  Page_Load(object sender,EventArgs e)
   Response.Cache.SetExpires(DateTime.Now.AddSeconds(600));
   Response.Cache.SetCacheability(HttpCacheability)

 

<Panel>  容器

HtmlButton hb=new HtmlButton();

 


<asp:MultiView id="MultiView1" runat="server" ActiveViewIndex="0">
  <asp: View ID="View1" runat="server">
1111111111111111
<asp :Buttion Id="Button1" runat ="server" CommandArgument="View2" CommandNtext="到下一个">

 

 

 


FileUpload1.FileName;得到上传文件的名子
FileUpload1.PostedFile.ContentLength.ToString(); 得到上传文件大小
FileUpload1.PostedFile.ContentType; 得到文件上传类型
FileUpload1.FileName.Substring(name.LastIndexOf(".")+1);得到点后面的类型

 

CheckBoxList
CheckBox
RadioButton GroupName AutoPostBack

 

mmouserover ="c=this.style.backgroundColor;this.style.backgroudColor='#00ff99'"


存取修改器
public 

private 限定此类内部使用

protected 除了类本身可以用外,任何继承也可以用不着

internal  同一个应用程序可以用  类库中都可以用

 

函数
Page_Load,ToString(),Convert.Toxxx
把字符转换成 整型  

int b =Convert.ToInt32(TextBox2.Text);

 

 

foreach ...in 循环
string[] thc=new string[] {"aaa","bbb","ccc" };

foreach( string r in thc)
{//迭代
  if (r.Contains("a") )           //关健字  Contains包含  Convert强转换
  {
    Response.Write(r.ToString()+"<br>");
  }

}


分支结构:

try
{
}
catch
{
}

Swithc(a)不能有比较的呀。应该是确定的数值
{
 case 1:
   
    break;
 case 1:
   
    break;

 case 1:
   
    break;
 
  default:   
    break;

}

if 
{

}
else
{

}


if()
{

}
else if()
{
}
else if()
{
}
else
{
}

 

 

两维数组
string[,] abcd=new string[2,4];
abcd[0,0]="田洪中";
abcd[0,1]="田洪中";
abcd[0,2]="田洪中";

abcd.Rark;得到数组的维数

得到数组最大维数的上限   GetUpperBound(abcd.Rank-1)


DateTime dat=Convert.ToDate.Time("11/12/2006");
int a=100,b=5;
Lable1.Text=Convert.ToString(a+b);

int c=888;
int? cc=null;
Lable.Text=convert.ToString(c ??cc )

Double jgz   结尾操作   整型与符点型可以相加

把  整型赋符点型会出错


声明数组的引用  string[] arr;
初始化大小    arr=new string[5];

string[] abc =abc=new string[3];
string[] thc ={"aa","bb","cc"}

 


String name=Request.Form["name"];     得到姓名
Request.Params["name"];

当前网页虚拟路径  Request.ServerVariables["url"];
当前网页的虚拟路径  Request.RawUrl;
实际路径  Request.ServerVariables["path_translated"];
实际路径  Request.PhysicalPath;
服务器名  Request.ServerVariables["server_name"];
服务器IP  Request.UserHostAddress;


获取客户游览器的环境变量
浏览器是否支持背景音乐    Request.Browser.BackgroundSounds;
是否支持框架              Request.Browser.Frames;
客户用的什么系统          Request.UserHostAddress;


HttpCookie nc=new HttpCookie("newcookie");
nc.Values["name"]="我的Cookie";
nc.Values["age"]="我的年龄";
nc.Values["dt"]=DataTime.Now.ToString();
Response.Cookies.Add(nc);
Response.Write("Cookie写入成功");

读取Cookies
HttpCookie getcookie=Request.Cookies[newcookie];
Response.Write(getcookie.Values["name"]);
Response.Write("<br/>"+getcookie.Values["age"]);
Response.Write("<br/>"+getcookie.Values["dt"]);

SqlDataSource 数据源

Response.Clear()删除所有
Response.ClearHeaders()删除头信息
Response.ClearContent()删除全部
Response.Expires=5
Response.ExpiresAbsolute=DataTime.Now.addHours(8);
Response.Buffer=false
Response.Flush();输出缓冲
Response.end()
Response.Redirect("http://www.163.com")


输出文件
String aa=Server.MapPath("~/app_data/a.xml").ToString();
Response.WriteFile(aa);

Response.Write(Server.HtmlDecode(Server.HtmlEncode("<script>alert('今天你好吗')</script>")))


状态管理  Application(全局变量)共享对象,   Lock(); 
Application["a"]=(int)Applicaltion["a"]+1;
 Unlock;
Session  每个人进到进程
 void Session_Star()
{
}

Cookie保存客户

switch(((Button)sender).CommandName) //事件的发生源  强制转换成Button
{
    case "a":
    Label2.Text="aaa"
    case "b":

    case "c":
   
    default:
     Label2.Text="出错了呀。"
     break;
}

AdRotator1广告控件

ImageUrl 图片地址
NavigateUrl 连接地址

ALternateText 当放图片上显示的提示文字
Keyword 关键字
impressions 权重  频率权重


Bulleted List

 

 


public Class car
{
  private string color;    //私有变量
  private int chelun=4;

    Public string Color
  {
   get{
    return color;
    }
    set
     {
    color=value;
   }
  
}
 
}

声名类(仅是一个堆栈) =  new表示初始化,并可以用
car oncar =new car();
onecar.Color= 

char 只能有一个单引号。字符只能有一个呀。
bool类型

日期类型     DateTime 日期类型     DateTime dt;
dt=DateTime.Now;当前时间
DateTime.Now.ToString();
                     赋值应该是估定类型 MM/DD/YY
DateTime dat=Convert.ToDate.Time("11/12/2006");

Response.Write (dt.Year.GetType()+"<br>");
Response.Write("年:"+dt.Year);
Response.Write("月:"+dt.Month);
Response.Write("日:"+dt.Day);
Response.Write("输入出完整"+dt);
长日期格式  dt.ToLongDateString();
长时间格式  dt.ToLongTimeString();
短日期格式  dt.ToShortDateString();
短时间格式  dt.ToShortTimeString();

 


dt

 

 

 





AdRotator  Advertisements  Impressions
 FileUpload
 LinkButton
 RadioButtonList
 
BulletedList
 HiddenField
 ListBox
 Substitution
 
Button
 HyperLink
 Literal
 Table
 
Calendar
 Image
 MultiView and View
 TextBox
 
CheckBox
 ImageButton
 Panel
 Wizard
 
CheckBoxList
 ImageMap
 PlaceHolder
 Xml
 
DropDownList
 Label
 RadioButton
 


if(confirm("确定要删除此常用语吗?"))
     return true;
   else
     return false;
column
detail
Execute
summary
Repeater
Navigate
Generate
Alternating
Procedure  程序

<httphandlers>
  ...
  <add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory,System.Web" />
  ...
</httphandlers>
anonymous
Identification
authentication
authorization


<%@ Page Language="C#" Theme="OrangeTheme" %>      主题优先与控件的属性
<%@ Page Language="C#" StyleSheetTheme="StyleSheetTheme" %>    控件本身的属性优先于主题的属性
<%@ Page Language="C#" Theme="OrangeTheme" StyleSheetTheme="GreenTheme" %> 
<%@ Page MasterPageFile="Site.master" %>
body {
    background-color:green;
}
advertisementfile
<%@ MasterType VirtualPath="Site.master" %>指令来创建对母版页的强类型引用,并指定到母版页的虚拟路

径:
Principal
<authentication mode="Forms"/>
    <authorization>
        <deny users="?" />
    </authorization>

<authorization>
    <allow users="someone@www.contoso.com" />
    <allow roles="Admins" />
    <deny users="*" />
</authorization>
<%@ Import Namespace="System.Web.Security " %>

Description 描述
Property  资产
<urlMappings enabled="true">
      <add
          url="~/Category.aspx"
          mappedUrl="~/Default.aspx?category=default" />
      <add
          url="~/Autos.aspx"
          mappedUrl="~/Default.aspx?category=autos" />
      <add
          url="~/Games.aspx"
          mappedUrl="~/Default.aspx?category=games" />
      <add
          url="~/Health.aspx"
          mappedUrl="~/Default.aspx?category=health" />
      <add
          url="~/News.aspx"
          mappedUrl="~/Default.aspx?category=news" />
    </urlMappings>
<%@ OutputCache Duration="60" VaryByParam="none"%>此指令仅指示页应缓存 60 秒,并指示页不随任何 GET

或 POST 参数而变化
<%@ Page Culture="auto:en-US" %>自动检测浏览器语言以确定区分区域性的格式设置
globalization
ResourceManager   资源文件
GlobalResources

 

App_Theme
AdRotator
 FileUpload
 LinkButton
 RadioButtonList
 
BulletedList
 HiddenField
 ListBox
 Substitution
 
Button
 HyperLink
 Literal
 Table
 
Calendar
 Image
 MultiView and View
 TextBox
 
CheckBox
 ImageButton
 Panel
 Wizard
 
CheckBoxList
 ImageMap
 PlaceHolder
 Xml
 
DropDownList
 Label
 RadioButton
 
ImageUrl NavigateUrl AlternationText KeyWord Impressions BulleteList ListItem summary

ValidationExpression ConfigurationManager ExecuteNonQuery Template Columns Details Rectangle

Repeater IsValid IsPostBack summary   dashed
 
using System.Data.Oledb;//用到acess数据库
using System.SqlClient ;//用到sql数据库
 
  ValidationExpression="([0-9]{2,3})([.])([0-9]{1,3})([.])([0-9]{1,3})([.])([0-9]{1,3})"
 n.
虚线
myipxb.Items.Add(iptb.Text);把iptb.Text的值添加到myipxb.Items.add  添加lsit
<% @ Register Assembly="DXControls" Namespace="DXControls" TagPrefix="cc11" %>
<cc11:dxtb id="concentdx" runat="server" height="100px" width="450px"></cc11:dxtb>                

     
 OleDbCommand cmd = new OleDbCommand(que,con);
 int count = Convert.ToInt32(cmd.ExecuteNonQuery());
 
 得到html编码
 if (IsValid)把检证控件都通过
 string name =Server.HtmlEncode(myname.text.ToString().Replace("'","!"))  替换把"'" 转成"!" 防止

SQL注入

 if(odb.insert(que)) //如果插入成功     /调用ODB类的插入方法,并把SQL语句作为参数传给类,让

他帮助完成
  {
  Response.redirect 导向文件
  }


 //因为要使用Access数据库,所以这里得引入命名空间
using System.Data.OleDb;
 /// <summary>   摘要  summary
/// 这里主要是留言本会用到的数据库连接类,因为数据操作并不多,所以把常规的操作类也一并放这里了
/// </summary>
public class odb
{
   public string name;
    public string email;
    public string qq;
    public string msn;
    public string url;
    public string title;
    public string concent;
    public string face;
    public string ip;
    public string pwd;
    public string uid;
    public string pwda;
    public DateTime dtt;
    private int test11;
    private int my_field;
   
    public odb()
 {
  //
  // TODO: 在此处添加构造函数逻辑
  //
    }

     public static OleDbConnection con()
    {//数据库连接类
        OleDbConnection con = new OleDbConnection(ConfigurationManager.ConnectionStrings

["book"].ConnectionString);
        return con;
    }
    public static bool insert(string que)
    { //根据传进来的SQL语句执行插入/删除/更新等操作
        OleDbConnection con = odb.con();
        con.Open();
        OleDbCommand cmd = new OleDbCommand(que,con);
        int count = Convert.ToInt32(cmd.ExecuteNonQuery());
        if (count > 0)
            return true;
        else
            return false;
    }
    public static DataTable ds(string que)
    {//返回一个装载了SQL制定留言的数据表,
        OleDbConnection con = odb.con();
        OleDbDataAdapter oda = new OleDbDataAdapter();
        oda.SelectCommand=new OleDbCommand(que,con);
        DataSet ds = new DataSet();
        oda.Fill(ds,"thc");
        return ds.Tables["thc"];
    }
    public static bool img(string que)
    {//根据传来的条件查询该项是否有内容,有就返回true
        OleDbConnection con = odb.con();
        con.Open();
        OleDbCommand cmd = new OleDbCommand(que,con);
        if (cmd.ExecuteScalar().ToString() != "")
            return true;
        else
            return false;
        con.Close();
    }
    public static string scr(string que)
    {//同样是根据传来的SQL语句返回一个字段的值,我不太喜欢把SQL语句做在内中,感觉不灵活
        OleDbConnection con = odb.con();
        con.Open();
        OleDbCommand cmd = new OleDbCommand(que,con);
        return cmd.ExecuteScalar().ToString();
    }
    public static int num(string mm)
    {//根据要求返回一个一个显示条目数
       return  Convert.ToInt32(odb.scr("select ["+mm+"] from [config]"));
    }

    public void Method()
    {
        throw new System.NotImplementedException();
    }

    public void Method1()
    {
        throw new System.NotImplementedException();
    }
}


GridView


DetailsView
FormView

Alternationg

Alternationg
 summary
Separator

<PagerTemplate>
<asp:LinkButton CommandName="Page">
    2006-12-16
</PagerTemplate>

IsPostBack

if (IsValid) 该判断限制页面上所有的验证控件必须通过才可以
 

SelectedIndex属性
排序与分页后仍保留当前选中的数据行
<ASP:GridView AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"

DataKeyNames="au_id" DataSourceID="SqlDataSource1" EnableSortingAndPagingCallbacks="True"

ID="GridView1" runat="server">

<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" 

AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="bbsacs"  >

数据
GridView1_DataBound(ByVal sender As Object ,ByVal As System.EventArgs)

procedure

OnDataBound=""
OnRowCreated
ImageUrl
NavigateUrl
AlternateText        
Repeater  表示转发器
Rectangle HotSpot
              Generate
Columns       Generate    
Details   详细资料        Columns
Template

Details
Template
Columns        Generate   

posted @ 2006-12-25 14:55  Winner.Net(2007)  阅读(1445)  评论(0编辑  收藏  举报