易截截图软件、单文件、免安装、纯绿色、仅160KB

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


相关文档:

在asp.net AJAX客户端使用复杂数据类型方法

<script language="javascript" type="text/javascript"> 
  function doubleSalary()
  {
  var employee = new Object();
  employee.FirstName = "X";
  employee.LastName = "PP";
  employee.Salary = 1000;
......

jQuery Ajax缓存问题

在使用jQuery 的Ajax加载数据是 如果使用get方式传递参数则存在一下问题
firefox下传递数据正常
ie下则会出现缓存问题
解决方法:
1、http://yourwebsite?parseInt(Math.random() * 1000) 在url后面加上一个随即数,这样每次发送的就不一样了,而且不影响你的功能.
2、使用post传递参数
......

AJAX中文乱码的两类问题解决方法

1)发送路径中的参数有中文,在服务器端接收参数值是乱码
解决方法:
PHP:
服务器端:iconv("UTF-8","gb2312",$_POST[变量名]);
JSP:
客户端:
利用javascript的提供的escape()或encodeURI()方法, 例
var url="a.jsp?name=小李";
url=encodeURI(url);
url=encodeURI(url); //两次,很关键[具体为什么,我也不清楚 ......

Asp.net AJAX Web Service写法差异

在C#中
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
using System.Collections.Generic;
using System.Collections;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.Ba ......

ajax XMLHttpRequest post get

/*在有中文参数时,接收方需要使用UTF-8方式对数据进行解码
*不支持post附件
*/
function getXmlHttpRequest() {
    var xmlHttpRequest = null;
    try {
        xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
    } ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号