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

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.BasicProfile1_1)]
[GenerateScriptType(typeof(Employee ))]
[ScriptService]
public class PeopleManagementService : System.Web.Services.WebService
{
    [WebMethod]
    [ScriptMethod(UseHttpGet = true)]
    public Employee CreateNewEmployee()
    {
        return new Employee();
    }
}
vb.net
Imports System;
Imports System.Web;
Imports System.Web.Services;
Imports System.Web.Services.Protocols;
Imports System.Web.Script.Services;
Imports System.Collections.Generic;
Imports System.Collections;
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
<GenerateScriptType(GetType(Employee))> _
<ScriptService()> _
Public Class PeopleManagementService 
    Inherits System.Web.Services.WebService
   <WebMethod()> _
   <ScriptMethod(usehttpget:=True)> _
    Public Function CreateNewEmployee() As Employee
        Return New Employee()
    End Function
End Class
C#中的static,对应vb.net shared
因为自己基本上使用的vb.net,看的资料又基本上是C#的,很少的vb.net的例子,就将差异记录下来


相关文档:

发布asp.net应用程序

对于开发者自身的机器来讲,可能程序运行不会有任何问题,但关键是,程序往往要发布到用户的机器上,如果用户有专门的服务器,那另当别论,但如果用户只是想用一台普通不能在普通的办公机器当服务器的话,发布程序,可能就要做的事情多一些:
1、首先检查系统有没有安装iis,如果没有,要上网下载iis的安装包,通过“ ......

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

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

AJAX扩展控件Rating(等级控件)的使用方法总结


如上图所示的等级控件(这个控件主要指定样式):
页面代码:
<head runat="server">
<title>无标题页</title>
<mce:style type ="text/css"><!--
.ratingStar
{
font-size:0pt;
width:15px;
height:12px;
......

asp.net 对 文件进行压缩 or 解压(zip

asp.net 对 文件进行压缩 or 解压(zip)
/// <summary>
/// 对文件进行(压缩,解压)
/// </summary>
public static class ZIP
{
/// <summary>压缩文件</summary>
/// <param name="filename">filename生成的文件的名称,如:C\123\123.zip</param>
/// <param name="d ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号