风言枫语  

     $.ajax({
                        type: "get",
                        cache: false,
                        //方法所在页面和方法名     
                        url: "ShareCus.aspx",
                        data: { "name": para,"xml":"1" },
                        contentType: "application/json; charset=utf-8",
                        dataType: "text",
                        success: function (data) {
                            $('#<%=lb_dutyname.ClientID%>').text(data);
                        },
                        error: function (err) {
                            alert(err);
                        }
                    });

 

 

 

.cs

 protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request["xml"]==null)
            {
            }
            else
            {
                GetTip(Request["name"]??string.Empty);
           
            }

        }

    }

 public   void GetTip(string name)
    {
        string result = string.Empty;
        Users user = null;
        if (!string.IsNullOrEmpty(name))
        {

 result=name+"1111";
         }
        Response.Clear();
        Response.Write(result);
        Response.End();
    }

 

 

 

 

 

 

 

 

 

 

 

posted on 2013-08-30 19:15  风言枫语  阅读(916)  评论(0编辑  收藏  举报