AJAX中DragPanelExtender扩展控件
页面代码:
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Panel ID="Panel1" runat="server" Height="170px" Width="242px">
<asp:Panel ID="Panel2" runat="server" Height ="18px">
<div style="background-image:url(image/AjaxMenuBg2.gif); background-repeat:repeat-x; color:White">我可以移动</div>
</asp:Panel>
<asp:TextBox ID="TextBox1" runat="server" Height="134px" Width="232px"></asp:TextBox></asp:Panel>
<cc1:DragPanelExtender ID="DragPanelExtender1" runat="server"
TargetControlID="Panel1"
DragHandleID="Panel2"
>
</cc1:DragPanelExtender>
</div>
<script type="text/javascript">
function setBodyHeightToContentHeight() {
document.body.style.height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight)+"px";
}
setBodyHeightToContentHeight();
&nbs
相关文档:
应项目需求,测试了下自动发送邮件的功能,以实现,下面分别介绍前台的Ajax和后台c#
前台:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SendEmail.aspx.cs" Inherits="SendEmail" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- ......
如上图所示的等级控件(这个控件主要指定样式):
页面代码:
<head runat="server">
<title>无标题页</title>
<mce:style type ="text/css"><!--
.ratingStar
{
font-size:0pt;
width:15px;
height:12px;
......
/*在有中文参数时,接收方需要使用UTF-8方式对数据进行解码
*不支持post附件
*/
function getXmlHttpRequest() {
var xmlHttpRequest = null;
try {
xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
} ......
在本节我准备只写上关于Ajax的说明,多数来自jQuery的帮助文档,所以不要放在首页。因为我觉得首页应该是要花费了时间和心思的作品。代码演示和jQuery Ajax 一些新的,将在下一次有空时讲述,这里就不讲了。时间已经0晨了。如果你举得有什么jQuery的疑问或者觉得Ajax该讲述那些内容的都可以跟我留 ......