asp.net后台获取js表格的数据
会ajax的飘过
看论坛里好多人在找后台获取js表格的数据,就把以前的方法放在这里了
前台:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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 runat="server">
<title>asp.net获取前台js表格的数据</title>
<style type="text/css"><!--
.dis-ime
{
ime-mode:disabled;
}
-->
</style>
</head>
<body>
<form id="form1" runat="server">
<h3>使用客户端添加表格的保存</h3>
<p>
主是就是在提交到服务器之前,处理好表格里的信息,然后赋值给hidden<br />
to mqtheone:这里我设置最后一列只能输入数字了,你可以参考一下
</p>
<div>
<table id="tab1">
<tr>
<th>名称</th>
<th>内容</th>
<th>值</th>
<th></th>
</tr>
<tr>
<td><input type="text" /></td>
<td><input type="text" /></td>
<td><input type="text" class="dis-ime" onkeypress="return check(event)"/></td>
</tr>
</table>
<input type="button" style="margin-left:400px" mce_style="margin-left:400px" value="添加信息" id="btnAddInfo" /><br />
<asp:Button ID="Button1" runat="server" Text="提交" OnClientClick="initData();"
onclick="Button1_Click" />
<asp:HiddenField ID="HiddenField1"
runat="server" />
</div>
</form>
</body>
<script type="text/javascript"><!--
var $=function(){return document.getElementById(arguments[0]);};
var check=f
相关文档:
ASP.NET C# 生成静态页面简单方法
//源码是替换掉模板中的特征字符
string mbPath = Server.MapPath("template.html");
Encoding cod ......
Asp.net支持三种类型的cache
想写一个技术快速概述,可能写得太多了。技术概略的目的是以最快最简单的方式描述出技术要点,也是我希望的最有效率的知识传播方式。
1. 页面/控件cache
2. 应用程序级cache
3. 浏览器客户端cache
从实现方式来看,页面/控件cache和应用程序级cache都是存放在服务器内存里面的,随着内 ......
ASP.NET生成随机密码
在开发需要用户注册后才能使用提供的各项功能的应用程序时,在新用户提交注册信息后,较常见的做法是由程序生成随机密码,然后发送密码到用户注册时填写的电子信箱,用户再用收到的密码来激活其帐户。
实现ASP.NET生成随机密码功能是很容易的,下面的代码给出了完整的实现方法:
publicstaticstring ......
ASP.NET 数据控件:GridView,DataList,Repeater ,DetailsView,FormView。
ASP.NET 数据控件综述:
1.前3个用于呈现多条记录,后面2个用于呈现单条数据明细,即常用的记录明细。
2.GridView
和DetailsView控件的布局固定,自定义数据显示的布局功能有限,一般适合布局简单的数据呈现。3.DataList,Repeater和
FormView数据 ......