Hi,
We are currently writing our ASP.NET pages using c# and .NET 2.0 framework and we are about 4 months out from upgrading to .NET 3.5 framework. Meanwhile we have a very client-side JS heavy page to push out in 2 months. We are currently looking at JayRock to handle our client-to-server service methods invoking with JSON data. One of...
I am new to MVC, and am trying to make a simple site work. I'm starting to wonder if it is really worth it...I could have had this site up and running with "old-school" ASP.Net two or three times already...but that is beside the point ;-)
How can I get my controller to return a JSONResult without the browser prompting me to save the res...
I am currently working on a project that lets users post comments with jquery and ajax. So far it is using Json and retunring several items, username, comment text, user photo url, comment ID number and stuff like that, I then need to use some sort of template to make all this data go into the correct div's before adding it all to the s...
In the following Jackson/Java code that serializes objects into JSON, I am getting this:
{"animal":{"x":"x"}}
However, what I actually want to get is this:
{"dog":{"x":"x"}}
Is there something I can do to AnimalContainer so that I get the runtime type ("dog", "cat") of the object, instead of "animal")? (Edit: I am aware that the ...
I need to develop a page which has 2 dropdownlist.
Options of dropdownlist 2 are based on selection of dropdownlist 1.
I have 2 methods to change the dropdownlist 2. What will you choose?
1:
Postback when users select dropdownlist 1 and change dropdownlist 2.
Pros:
Can use the postback feature, can use the asp.net validator
Cons:
Need...
Hello,
The below is a dump of variable $x (youtube video).
But I want to access media$title, but obviously when I try
$x->media$title->$t
it does not work. Any suggestions on how to access the title of the youtube video?
stdClass Object (
[version] => 1.0
[encoding] => UTF-8
[entry] => stdClass Object ( [xmlns] => http://www.w3...
I'm trying to bind a JSON array to a datagrid in Silverlight 3. I do not get any exceptions but I do not see the column values in the datagrid. I do see the rows though, but I do not know what the binding property should be. I do not want to create a class, populate the class and the bind. That works. I do not know what columns and datat...
I have looked at a few JSON libraries for Java, but few of them seem to follow the same serialization pattern as core Java serialization patterns. I would like to use a native Java JSON serialization object, but in the absence of that what third party library matches Native serialization and preferably will serialize anything marked ser...
I have a partial view that returns an HTML chunk of list items that gets appended onto an unordered list via an AJAX call. This all works fine.
However, once I receive the HTML back from the AJAX call, I would like to be able to set some properties on each of the list items via JQuery. In order to do that, I'm assuming that I need to ...
Rails has a nice idiom that makes it easy for you to have a single action method return properly formated data (json, xml, just the data) based on the format specified by the client (or else deduced from the request. It looks something like this ...
respond_to do |format|
format.html #edit.html.erb
format.json {render :text=> <your...
Hi, how to decode a json response in c#?
...
I have an object with 2 ArrayList properties.
public class TestDTO
{
public ArrayList Test1 { get; set; }
public ArrayList Test2 { get; set; }
}
I am returning the the object as JSON in my JsonResult Action. The SUCCESS from my AJAX call looks like the following but it does not appear to be working. What do I need to do to a...
I'm trying to create a tagcloud for an application. When I click a tag from the tagcloud, the backgroud for the tag must be changed. Here a simple html code for a tag:
<a about="http://localhost/d456c6" href="http://localhost/d456c6" class="tagweight0 Resource">abda</a>
To change the background i'm using the following:
$('tagweight0'...
I'm having a hard time getting my head around this, and Google just isn't being helpful.
I'm looking at converting some legacy code to use the following technologies: ASP.NET, WCF, jQuery.
The ASP.NET conversion isn't an issue, nor is accessing the WCF service for data, on the server-side.
However, what I'm having an issue with is pot...
i have a php function which returns a random json encoded color
<?php
function randNum() {
return rand(0, 255);
}
$color = array ('r'=>randNum(),'g'=>randNum(),'b'=>randNum());
echo json_encode($color);
?>
on the page i have a jquery function that whenever an event occurs, asks for a color and changes the win...
hi..
I am getting JSON response from the server..Inside that JSON string i am having HTML content which i need to display in a field..
Can anyone help..
...
I'm getting a JSON response from the server. Inside that JSON string I have HTML content which I need to display in a field. How do I do this?
...
I have the following function which works great, i used JSONP to overcome cross-domain, wrote an http module to alter the content-type and didn't append a callback name in the url.
function AddSecurityCode(securityCode, token) {
var res=0;
$.ajax({ url: "http://localhost:4000/External.asmx/AddSecurityCode",
data: { securityCode: JSO...
Is there anything special I have to do to a JSON object before I send it with AJAX? My code looks like this:
runAjax(JSON.stringify(data));
}
function runAjax(JSONstring)
{
ajax = getHTTPObject();
var params = "?data=" + JSONstring;
ajax.open("POST", "createtrip.php", true);
ajax.setRequestHeader("Content-type", "app...
With the introduction of Zend_Rest_Route in Zend Framework 1.9 (and its update in 1.9.2) we now have a standardized RESTful solution for routing requests. As of August 2009 there are no examples of its usage, only the basic documentation found in the reference guide.
While it is perhaps far more simple than I assume, I was hoping those ...