CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of call
//start processing
var api = new moviesApi();
api.getRatings({
    success: function (result) {
        for (var i = 0; i < result.length; i++) {
            //new Option(text, value)
            var option = new Option(result[i].ID, result[i].Name);
            $('#ratings').append(
                $('<option></option>').val(result[i].ID).html(result[i].Name)
            );
23 Views
no comments
 
C#
// JavaScript Code
$().ready(function () {
 
    ajaxCallMethod("CallbackHandler.ashx?", "GetDate",
    [{ Name: "Rick", Entered: new Date(2012,0,1) }],
    function (result) {
        alert(result);
    });
 
    ajaxCallMethod("CallbackHandler.ashx?", "GetDate",
by Rick Strahl   March 19, 2012 @ 4:38pm
111 Views
no comments
 
C#
///////////////////////////////////////////
//From the service.cs side//
///////////////////////////////////////////
 
//Make sure u include these namespaces
using System.Web.Script.Services;
using System.Web.Script.Serialization;
 
//Have the webservice class have this Attribute to allow ajax calls
[System.Web.Script.Services.ScriptService]
by Egli   January 23, 2012 @ 8:04pm
33 Views
no comments
 
/* Google jquery CDN 
 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> */
   
            $.ajax(
            {
                type: "POST",
                contentType: "application/json; charset=utf-8",
                url: "services/FeedService.svc/ServiceMethod",
                data: '{"param1":"data1" , "param2":"data2"}',
                dataType: "json",
by frank2tek   October 04, 2011 @ 11:25am
103 Views
no comments
 
C#
//using System.Web.Security
FormsAuthentication.SignOut();
by Egli   July 19, 2011 @ 7:35pm
118 Views
no comments
 
C#
//using System.Web.Security
 
if (Membership.ValidateUser(username, password))
{
   //Log in user.
   FormsAuthentication.SetAuthCookie(username, true);
}
else
{
   //Handle user not exist code.
by Egli   July 19, 2011 @ 6:32pm
120 Views
no comments
 
C++
#include <SDL/SDL.h>
#include <stdio.h>
 
using namespace std;
 
void func_callback(void *unused, Uint8 *stream, int len) {
 
    for (int i=0;i<len;i++) {
        stream[i] = i;
    }
by AZiCoDec   December 18, 2010 @ 4:33pm
160 Views
no comments
 
C#
private IEnumerable<MemberInfo> GetImportMembers(Type type)
        {
            var local = new HashSet<string>();
            if (type.IsAbstract)
            {
                yield break;
            }
 
            foreach (var member in GetDeclaredOnlyImportMembers(type))
            {
335 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate