RcBuilder@walla.com
call centre: 054-5614020

jsonp – the basic

Posted by: RcBuilder  /   Category: AJAX / button / CROSS DOMAIN / Generic Handlers / HTML / HttpRequest / JAVASCRIPT / jQuery / JSON / onclick event / SOURCE CODE   /   No Comments
06
Oct
2014

jsonp - the basic SERVER string callback = string.Empty; if (context.Request.QueryString != null) callback = context.Request.QueryString.Trim(); if (callback == string.Empty) return; string json_data = ""; context.Response.Write(string.Concat(callback, "(", json_data, ");")); CLIENT <script src="JS/jquery-1.4.2.min.js" type="text/javascript"></script> <script type="text/javascript"> function JsonP_Callback(json_res) { alert(json_res); } function JsonP_Call() { $.ajax({ dataType: "jsonp", // jsonp type url: "JsonP.ashx", jsonp: "callback", // param name jsonpCallback: "JsonP_Callback" // callback function name }); } </script> HTML <input type="button" value="JsonP_Call" onclick="JsonP_Call()".

Read more

Asp.Net Session in ashx file

Posted by: RcBuilder  /   Category: BUGS / Generic Handlers / Interfaces / IRequiresSessionState / SOURCE CODE   /   No Comments
23
Sep
2014

Asp.Net Session in ashx file Problem Asp.Net Session is null in ashx file (generic handler) Solution You have to "implement" either IRequiresSessionState or IReadOnlySessionState, with former providing full access to session, and the latter providing read-only access. using System.Web.SessionState; USING using System.Web.SessionState; public class MyHandler : IHttpHandler, IRequiresSessionState{ var user =.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים