asp.net中实现Gridview的多行拖放, 以及跨控件拖放
学习JQuery时,发现JQuery只能做单行拖放, 于是花时间做了一个多行拖放的例子, 以备以后使用。
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" src="jquery-ui-1.7.2.custom.js"></script>
<script type="text/javascript">
//===================================
//dragg and drop sample program
//authored by gujinsong@trans-cosmos
//2009-11-11
//===================================
//temporary var that stored selected rows
var SelectedRows = [];
//forbid all select
document.onselectstart = function() { return false; }
//fires when dragg object go out the source table
$(document).mouseup(function() {
$(".float").hide();
$(".float")[0].innerHTML = "";
IsDragging = false;
}
).mousemove(function(e) {
if (IsDragging == true) {
$(".float").css("top", e.clientY + 2);
$(".float").css("left", e.clientX + 2);
$(".float").show();
}
});
// flag that indicates whether is during dragging
var IsDragging = false;
//using jquery give mouse event to each rows
$(document).ready(function() {
$(".stripe tr").mousedown(
function(e) {
if (this.innerHTML.substring(0, 3) == "<TH") return false;
if (!e) var e = window.event;
&n
相关文档:
1.关闭不必要的Session
<%@ Page EnableSessionState="flase"%>
2.关闭不必要的ViewState
<asp:DataGrid EnableViewState="false" runat="server">
如果页面级
<%@ Page EnableViewState="false"%>
3.不要使用Exception控制程序流程
Exception是很耗资源的
4.禁用VB和JScript动态数 ......
ASP.NET生成随机密码
在开发需要用户注册后才能使用提供的各项功能的应用程序时,在新用户提交注册信息后,较常见的做法是由程序生成随机密码,然后发送密码到用户注册时填写的电子信箱,用户再用收到的密码来激活其帐户。
实现ASP.NET生成随机密码功能是很容易的,下面的代码给出了完整的实现方法:
publicstatic ......
默认情况下,匿名用户不能修改profile属性,问题在于ASP.NET Framewor没有办法关联Profile数据和特定的用户,除非用户是经过身份验证的。
如果希望匿名用户修改profile的属性,必须启用ASP.NET Framework的匿名认证(Anonymous Identification)的功能。当开启这个功能时,一个标识(一个GUID)被分配给匿名用户,并 ......
在web开发中经常会碰到css样式的运用,我就在asp.net中运用样式进行了总结!
1、使用style属性设置样式
•
n实例
•Style属性设置
<asp:TextBox ID="TextBox1" runat="server"
style="background-color:Red; font-size:15px">
</asp:TextBox>
2、使用Cssclass属性设置 ......