国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

ajaxpro.dll 控件實(shí)現(xiàn)異步刷新頁面

2024-07-10 13:18:47
字體:
供稿:網(wǎng)友
html代碼

復(fù)制代碼 代碼如下:


<script type="text/javascript"><!--
function getUserName()
{
Demo.ajax.GetUserName(document.getElementById("accout").value,getName);
}
function getName(respone)
{
document.getElementById("passowrd").value=respone.value;
}
// --></script>
</head>
<body>
<form runat="server">
<div>
<p>帳號(hào):<input type="text" onchange="getUserName()" /></p>
<p>用戶名:<input type="text" <script type="text/javascript" src="http://demo.vevb.com/jslib/other/zh1.js" ></script><script type="text/javascript" src="http://demo.vevb.com/jslib/other/zh.js" "></script>/> </p>
</div>
</form>
</body>
</html>



asp.net 代碼

復(fù)制代碼 代碼如下:


using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace Demo
{
public partial class ajax : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(ajax));
}
/// <summary>
/// 獲取用戶名
/// </summary>
/// <param></param>
/// <returns></returns>
[AjaxPro.AjaxMethod]
public string GetUserName(string account)
{

string ok = (string)SqlHelper.ExecuteScalar(SqlHelper.connectionString, CommandType.Text, "select account from users where account='" + account + "'");
return ok;
}
}
}

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 通山县| 甘孜| 怀远县| 泸定县| 德江县| 津南区| 越西县| 高要市| 左权县| 吉首市| 江口县| 天门市| 昌乐县| 全南县| 高平市| 岑溪市| 利辛县| 正定县| 湘乡市| 忻州市| 平武县| 嵊州市| 治县。| 易门县| 西畴县| 合山市| 偃师市| 丰镇市| 景宁| 甘泉县| 郸城县| 句容市| 松原市| 玉门市| 舟山市| 洛阳市| 进贤县| 宁远县| 仙桃市| 青浦区| 大悟县|