Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

jquery/ajax json data function not working -


i have following function suppose talk server retrieve json data , display problem function not initiating query i'm doing wronge? code uploaded apache tomcat server , used wireshark traces , there none on http port here code

$(document).ready( function() { var home_add='http://wcf.net:3300/gateway'; $('#handshake').click(function(){ alert(" sending json data");  function handshake(){     /*testing function */                        var data_send = {                           "supportedconnectiontypes": "long-polling",                           "channel": "/meta/handshake",                           "version": "1:0"                           };                       $.ajax({                 /* start ajax function send data */                            url:home_add,                           type:'post',                           datatype:'json',                           contanttype:'text/json',                           async: false,                            error:function(){ alert("handshake didn't go through")}, /* call disconnect function */                           data:json.stringify(data_send),                           success:function(data){                           $("p").append(data+"<br/>");                            alert("successful handshake")                            }                                               })                               } })}) 

thank in advance feedback lava

u dont call handshake function...

$(document).ready(function () { var home_add = 'http://wcf.net:3300/gateway'; $('#handshake').click(function () {     alert(" sending json data");     $.ajax({                 /* start ajax function send data */         url: home_add,         type: 'post',         datatype: 'json',         contanttype: 'text/json',         async: false,         error: function () { alert("handshake didn't go through") }, /* call disconnect function */         data: {             "supportedconnectiontypes": "long-polling",             "channel": "/meta/handshake",             "version": "1:0"         },         success: function (data) {             $("p").append(data + "<br/>");             alert("successful handshake")         }     });  }); 

});


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -