asp.net 回调技术
看了asp.net 的回调技术后不是很理解。还是把写的东西贴下,自己以后学习时候多看看。前台index.aspx页<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="_Default" %>
<%@ Import Namespace = "System.Text" %>
<!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>用户注册</title>
<mce:script language ="javascript"><!--
//客户端执行的方法
function Success(args,context)
{
message.innerText = args;
}
//下面的方法是当接收服务器方法处理的结果发生异常时调用的方法
function Error(args,context)
{
message.innerText = '发生了异常';
}
// --></mce:script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table border = "1" cellpadding="0" cellspacing = "0" width = "400px">
<tr>
<td width = "100px">用户名</td><td><input type = "text" size = "10" maxlength = "20"
id = "txtUserName" onblur = "CallServerMethod(txtUserName.value,null)" /><span id = "message"></span></td>
</tr>
<tr>
<td>密码</td><td><input type = "password" size = "10" maxlength = "20" id = "txtPwd" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>
后台index.aspx.cs
using System;
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;
public partial class _Default : System.Web.UI.Page, ICallbackEventHandler
{
string result = "
相关文档:
ASP.NET控件开发基础之类型转换器1.认识默认属性浏览器支持
让我们再认识一下属性,大家知道每个属性都是有类型的,最熟悉就是string,int这些类型了,VS2005属性浏览器对这些属性类型进行了识别,
如下例子
(1)table控件的Height属性,当你设置属性为字符串时,则提示错误信息
(2)当属性类型为Color属性时,属性浏览器 ......
html知识,Request.Form
接收的是Name值,而非ID值
若是用aspx页面取值,表单中的runat="server"要去掉。
asp.net知识,asp.net的控件的ID和Name值是一样第,但是其在客户端表现是control.clientID而非
control.ID
asp.net本身也是可以跨页提交滴,如果是使用自己带的跨页提交就不存在上述问题,不过as ......
为了忘记:
1,System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32);:void
//从IIS来的请求
2,System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest) : Void
//在这一步创建一个HttpContext对象
3, System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext) : IHttpHandler
// ......
Flash/Flex也支持基于Socket的网络连接 ,服务器端可以是C++,VB,C#,Java等任一语言开发。监听一个网络端口便可以接收到Flash/Flex开发的客户端的连接。
ActionScript 3.0提供了通过Socket连接的方式与服务器端通信。这点是超越传统B/S结构的重要特征。这样使得网 ......
//一:用自己的服务器作为邮件服务器时:
//如出现:邮箱不可用。 服务器响应为: 5.7.1 Unable to relay for ***@gmail.com
//解决办法如下:在IIS中,右击“默认SMTP虚拟服务器”,选择“属性”,切换到“访问”页,点击“中继”按钮,在弹出框中选择“仅以下列表除外&rdq ......