C#

General discussions about the c# language, Squirrels | gist.gi...
Nov 20, 2015 07:39
yes i am using logging functionaliy
Nov 20, 2015 06:48
http://pastie.org/10569091

I am calling this action method from front end and its giving me the right response on my local server like i got response.data.errors on front end
but when i am using it live its just giving me "bad request" in response.data
Sep 17, 2015 07:38
:)
Sep 17, 2015 07:38
sounds great
Sep 17, 2015 07:38
ok
Sep 17, 2015 07:37
but i have to use this string to fetch the data from it
Sep 17, 2015 07:37
yes
Sep 17, 2015 07:35
then is there any option?
Sep 17, 2015 07:35
?
Sep 17, 2015 07:35
but can i do for this
Sep 17, 2015 07:35
yeah i knw that...but i can't change this string because its coming from the PunchIn machine and i have to fetch the data from it
Sep 17, 2015 07:33
what can i do for fetch the enroll_id ,varify_mode from that string
Sep 17, 2015 07:33
string jsonString="{enroll_id:1,verify_mode:F,io_mode:AT,io_time:20150916220855}"
JObject o = JObject.Parse(jsonString);
And i am getting the following exception
{"Unexpected character encountered while parsing value: F. Path 'verify_mode', line 1, position 25."}
Sep 14, 2015 08:55
I am using a punchIn machine that is sending data on my Computer using the Http like http://<Server IP Address>:<Port No>/fkwebserver?page_id=receive_cmd&device_id=<1>&device_name=<2> and now i want o handle this request and want to access that data... How can i access data from this req. ?
Sep 10, 2015 15:23
How can i do that?
Sep 10, 2015 15:23
{"Status":1,"EventInfo":{"id":"143d8747-cd5b-40c6-a243-54da8cf7256c"}}
I have that Json object now i want to access the id from this in jquery
Sep 10, 2015 14:26
by removing async its working now
Sep 10, 2015 14:21
but i am unable to get the response with the ajax request
Sep 10, 2015 14:20
when i put it in browser url its showing me the results
Sep 10, 2015 14:20
Sep 10, 2015 14:20
I tried to use something like that but its showing me the alert Servidor de error 404 !! in error
$.ajax({
type: 'GET',
url: surl,
crossDomain: true,
contentType: "application/json; charset=utf-8",
data: { id: '143d8747-cd5b-40c6-a243-54da8cf7256c' }
dataType: "jsonp",
success: function (msg) {
console.log(msg);
},
error: function (xhr, status, error)
{
alert('Servidor de error 404 !!');
},
async: false,
cache: false
});
Sep 10, 2015 14:17
i have a webapi and when i enter this webapi in url it gives me the response but now i want to use this api in my jquery with ajax
how can i do this
 

ASP.NET

Welcome to ASP.Net Room. Don't ask to ask just ask your questi...
Nov 20, 2015 06:47
but when i am using it live its just giving me "bad request" in response.data
Nov 20, 2015 06:46
I am calling this action method from front end and its giving me the right response on my local server like i got response.data.errors on front end
Nov 20, 2015 06:44
public async Task<ActionResult> CreateUsers(CreateUserBindingModel registration)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    Response.StatusCode = 400;
                    //return Json(ModelState);
                    return Json(new
                    {
                        success = false,
                        errors = ModelState.Keys.SelectMany(k => ModelState[k].Errors)
                                        .Select(m => m.ErrorMessage).ToArray()
Sep 17, 2015 07:33
string jsonString="{enroll_id:1,verify_mode:F,io_mode:AT,io_time:20150916220855}"
JObject o = JObject.Parse(jsonString);
And i am getting the following exception
{"Unexpected character encountered while parsing value: F. Path 'verify_mode', line 1, position 25."}
what can i do for fetch the enroll_id ,varify_mode from that string
Sep 14, 2015 08:56
I am using a punchIn machine that is sending data on my Computer using the Http like http://<Server IP Address>:<Port No>/fkwebserver?page_id=receive_cmd&device_id=<1>&device_name=<2> and now i want o handle this request and want to access that data... How can i access data from this req. ?
Sep 11, 2015 07:28
how can i access the keyCode?
Sep 11, 2015 07:28
http://pastie.org/10411757#1
I want to access the keyCode that is 68 from the above code but when i type e.caller it gives me undefined
Sep 10, 2015 15:25
{"Status":1,"EventInfo":{"id":"143d8747-cd5b-40c6-a243-54da8cf7256c"}}
I have that Json object now i want to access the id from this in jquery
How can i do that?
Sep 10, 2015 14:18
i have a webapi and when i enter this webapi in url it gives me the response but now i want to use this api in my jquery with ajax
how can i do this
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Sep 11, 2015 07:29
pastie.org/10411757#1
I want to access the keyCode that is 68 from the above code but when i type e.caller it gives me undefined
how can i access the keyCode?
Sep 10, 2015 15:58
:)
Sep 10, 2015 15:58
and its working
Sep 10, 2015 15:58
i have used it
Sep 10, 2015 15:58
 success: function (msg) {
data = JSON.parse(msg);
console.log(data.EventInfo.id);
},
Sep 10, 2015 15:28
i have used something like that but its not working
Sep 10, 2015 15:25
Punjab
Sep 10, 2015 15:24
How can i do that?
Sep 10, 2015 15:24
{"Status":1,"EventInfo":{"id":"143d8747-cd5b-40c6-a243-54da8cf7256c"}}
I have that Json object now i want to access the id from this in jquery
Sep 10, 2015 14:26
thank you much
Sep 10, 2015 14:26
its working
Sep 10, 2015 14:26
thanks Jan Dvorak
Sep 10, 2015 14:22
let me try
Sep 10, 2015 14:22
ok
Sep 10, 2015 14:19
please help me out
Sep 10, 2015 14:19
I tried to use something like that but its showing me the alert Servidor de error 404 !! in error
$.ajax({
type: 'GET',
url: surl,
crossDomain: true,
contentType: "application/json; charset=utf-8",
data: { id: '143d8747-cd5b-40c6-a243-54da8cf7256c' }
dataType: "jsonp",
success: function (msg) {
console.log(msg);
},
error: function (xhr, status, error)
{
alert('Servidor de error 404 !!');
},
async: false,
cache: false
});
 

Trash can

Like the recycle bin, but trashier.
Sep 10, 2015 15:30
$.ajax({
type: 'get',
url: url,
crossdomain: true,
contenttype: "application/json; charset=utf-8",
data: { id: '143d8747-cd5b-40c6-a243-54da8cf7256c' },
datatype: "jsonp",
success: function (msg) {
var a = JSON.stringify(msg);
console.log(msg);
console.log(msg['EventInfo']['id']);
},
error: function (xhr, status, error) {
alert('servidor de error 404 !!');
},

cache: false
});
Sep 10, 2015 15:27
$.ajax({
type: 'get',
url: url,
crossdomain: true,
contenttype: "application/json; charset=utf-8",
data: { id: '143d8747-cd5b-40c6-a243-54da8cf7256c' },
datatype: "jsonp",
success: function (msg) {
var a = JSON.stringify(msg);
console.log(msg);
console.log(msg['EventInfo']['id']);
},
error: function (xhr, status, error) {
alert('servidor de error 404 !!');
},

cache: false
});