2007年12月10日

DetailsView EventArgs

摘要: <script runat="server"> protected void DetailsView1_ItemInserted(Object sender, System.Web.UI.WebControls.DetailsViewInsertedEventArgs e) { Response.Redirect("GridViewMasterDetailsInsertPage_cs.... 阅读全文

posted @ 2007-12-10 22:51 Scott Jin 阅读(129) 评论(0) 推荐(0) 编辑

引用DetailsView的一个单元格

摘要: protected void DetailsView1_DataBound(object sender, EventArgs e) { if (DetailsView1.CurrentMode == DetailsViewMode.Insert) { TextBox stateTextBox = (TextBox)DetailsView1.Rows[6].Cells[1].Controls[0];... 阅读全文

posted @ 2007-12-10 22:40 Scott Jin 阅读(171) 评论(0) 推荐(0) 编辑

ExceptionHandled

摘要: protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e) { if (e.Exception != null) { ErrorMessageLabel.Text = "Failed to DELETE due to foreign key contstraint on the table. You ... 阅读全文

posted @ 2007-12-10 22:33 Scott Jin 阅读(355) 评论(0) 推荐(0) 编辑

EventArgs

摘要: ASP.NET 快速入门教程 绑定到数据库插入数据中EventArgs处这两个代码不一样的呢? protected void DetailsView1_ItemUpdated(Object sender, System.Web.UI.WebControls.DetailsViewUpdatedEventArgs e) { GridView1.DataBind(); } protected void... 阅读全文

posted @ 2007-12-10 22:28 Scott Jin 阅读(931) 评论(1) 推荐(0) 编辑

SQL Cache Invalidation

摘要: ASP.NET 快速入门教程 绑定到数据库C# Data Source SqlCacheInvalidation教程中有这么一段话。ASP.NET 2.0 中的一个称为 SQL Cache Invalidation 的新功能允许配置数据源无限期地(或在指定的持续时间内)缓存数据,直至数据库中的数据更改,届时缓存项将被清除。此项技术允许使用更高的 CacheDuration 值,同时仍然保证显示的数... 阅读全文

posted @ 2007-12-10 21:53 Scott Jin 阅读(322) 评论(0) 推荐(0) 编辑

ConnectionString

摘要: 有几个参数不清楚,暂时不去深入。<connectionStrings> <!-- This connection is inherited from the ASP.NET Quickstart Web.config file Uncomment this section to edit the sample locally <add name="Pubs" connect... 阅读全文

posted @ 2007-12-10 12:57 Scott Jin 阅读(792) 评论(0) 推荐(0) 编辑

服务器端 Include 语法:<-- #Include File="Locaton.inc" -->

摘要: 服务器端 #Includes 使开发人员可以在 ASP.NET 页内的任意位置插入指定文件的原始内容。下面的示例演示如何在页中插入自定义页眉和页脚。<!-- #Include File="Header.inc" -->...<!-- #Include File="Footer.inc" --> 阅读全文

posted @ 2007-12-10 11:47 Scott Jin 阅读(182) 评论(0) 推荐(0) 编辑

服务器端注释语法:<%-- Comment --%>

摘要: 服务器端注释使开发人员能够阻止执行或呈现服务器代码(包括服务器控件)及静态内容。下面的示例演示如何阻止块内容执行并阻止向下发送到客户端。注意,<%-- and --%>之间的所有内容都被筛选掉,并且只在原始服务器文件中可见,即使该文件包含其他 ASP.NET 指令。 <%-- <asp:calendar id="MyCal" runat=server/> <% ... 阅读全文

posted @ 2007-12-10 11:45 Scott Jin 阅读(434) 评论(0) 推荐(0) 编辑

HTML 服务器控件语法

摘要: HTML 服务器控件使页开人员可以编程方式操作页中的 HTML 元素。HTML 服务器控件标记通过 "runat=server" 属性与客户端 HTML 元素区分开。下面的示例演示如何在 ASP.NET 页中使用 HTML <span runat=server> 服务器控件。 阅读全文

posted @ 2007-12-10 11:40 Scott Jin 阅读(177) 评论(0) 推荐(0) 编辑

声明代码语法:

摘要: 与 ASP 不同(ASP 可以在 <% %> 块中声明函数),所有函数和全局页变量必须在 <script runat=server> 标记中声明。在 <% %> 块中声明函数现在将生成一个语法编译错误。 阅读全文

posted @ 2007-12-10 11:28 Scott Jin 阅读(148) 评论(0) 推荐(0) 编辑

导航