ASP.Net页面静态化
步骤:
1. 新建一个WEB解决方案名称为HtmlStatic。
2. 在项目下建一个HtmlTemp.htm其代码如下:
<!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>
<title>{Title}</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<table cellpadding="5" cellspacing="0" width="500" border="2">
<tr>
<td>留言人: </td>
<td>{AddUserName} </td>
</tr>
<tr>
<td>留言信息: </td>
<td>{AddMsg}</td>
</tr>
<tr>
<td align="right" colspan="2">
留言添加时间:{AddTime}
</td>
</tr>
</table>
</body>
</html>
3. 在项目下建一个名字为Html的文件夹
4. 在项目下建一个AddData.aspx 代码如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddData.aspx.cs" Inherits="TestStatic.AddData" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td>留言人: </td>
<td> <asp:TextBox runat="server" ID="UName"> </asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="vd1" ControlToValidate="UName" ErrorMessage="请输入留言人"> </asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<
相关文档:
——灵活运用 Form 表单认证中的 deny 与 allow 及保护 .htm 等文件
作者:寒羽枫(cityhunter172)
第二部分 Form 认证的实战运用
话说上回,简单地说了一下 Form 表单认证的用法。或许大家觉得太简单,对那些大内高手来说应该是“洒洒水啦”“小 Kiss 啦(小意思)”。今天咱们来点 ......
原文地址:http://www.bengtbe.com/blog/post/2009/02/27/Using-StructureMap-with-the-ASPNET-MVC-framework.aspx
Using StructureMap with the ASP.NET MVC framework
2009-02-27 星期五 作者:bengtbe
在这里我要阐述的是怎么用.net frameword 框架下的StructureMap这个类.
在学习这个之间你需要对ASP.NE ......
1、给删除按钮添加是否确认提示:
前台方法:OnClientClick="return window.confirm('你确定要删除吗?')"
后台方法:btnDelete.Attributes.Add("onclick", "return confirm('您确定要删除吗?');");
2、DataSet中取值:
lblTitle.Text = ds.Tables[0].Rows[0]["Title"]. ......