jquery Ajax Access aspx

Source: Internet
Author: User

<script type= "Text/javascript" >function btnTest_Click () {$.ajax ({type: "POST", URL: "Authentication",// ContentType: "Application/text", DataType: "Text", data: {k: ' Cuw0k3vbly81dctluvdvzlf6dzvpzkvweudhuve5us9omkdqnwltdwmza1dczzn2rdzds0vpdmk2tnl3shiyb2vlzjd1cex1eitqzfvzv0mzbfnkruvhagxwm Utjzg9zau1hvkzmaxniqja9 '},success:function (Result) {alert ("1"), alert (RESULT.D),},error:function () {alert ("Access failed! ");}});/ /$.post ("Authentication", {k: ' Cuw0k3vbly81dctluvdvzlf6dzvpzkvweudhuve5us9omkdqnwltdwmza1dczzn2rdzds0vpdmk2tnl3shiyb2vlzjd1cex1eitqzfvzv0mzbfnkruvhagxwm Utjzg9zau1hvkzmaxniqja9 '},//function (data) {//alert (data);//},//"text");} </script>

  

 protected void Page_Load (object sender, EventArgs e) {try {if (!                        IsPostBack) {if (request.form["k"] = = null) {                        Response.Write ("fail");                    Return                    } string strk = request.form["K"];                    byte[] bytes = convert.frombase64string (STRK);                    String streinput = System.Text.Encoding.UTF8.GetString (bytes);                    WebTools.Encode.GetPass GP = new WebTools.Encode.GetPass (); String strdinput = GP.                    Decodepass (Streinput);                    string[] Arrypar = Strdinput.split (';');                    String strusernameinfo = Arrypar[0];                    String strketangidinfo = Arrypar[1];                    String strtstimeinfo = Arrypar[2];                    Verify that the user is logged in Editorauth ea = new Editorauth (); BOOL Bislogin = ea.Checkuserislogined ();                        if (!bislogin) {Response.Write ("fail");                    Return }//Verify that the class ID is valid and has purchased string zhibo_ketangid = System.Configuration.ConfigurationMan Ager.                    appsettings["Zhibo_ketangid"];                    string[] Arryketangid = Strketangidinfo.split (': ');                    String strketangid = Arryketangid[1];                        if (zhibo_ketangid! = Strketangid) {Response.Write ("fail");                    Return                    } string zhibo_isbuy = system.configuration.configurationmanager.appsettings["Zhibo_isbuy"];                        if (zhibo_isbuy! = "1") {Response.Write ("fail");                    Return                    } Response.Write ("Pass");      Return Content ("fail");          }} catch (Exception ex) {Response.Write (ex).            Message); }        }

  

jquery Ajax Access aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.