Tagged Questions
0
votes
3answers
66 views
MVC 3 binding SelectList to dropdown list with JQuery
I have the following question regarding the MVC and Jquery. I would like to be able to call with JQuery an action serverside and then returned result bind to a drop down list.
At this moment i do ...
2
votes
0answers
75 views
Using Asp.Net C# MVC4 and Json, how can I get my chart to update in line with my paged datatable
I am using datatables and charts. I would prefer to return standard data through the model but cant for some odd reason, and the controls only seem to work with Json. Perhaps it's just my ...
0
votes
1answer
39 views
Sending value through Jquery is showing null
I am working on MVC3 and trying to pass values form view to controller using JQuery and JSON. The query is extracting values of checkboxes inside a grid. Following is the code
<script ...
0
votes
2answers
34 views
JsonResult is not returning large number of items and throws an error?
Im using asp.net mvc, the controller and repository seen to work fine.
here is the repository:
public IEnumerable<ReadingListMediaChannel> GetReadingListsById(int readingListId)
{
...
0
votes
1answer
58 views
How to parse date time from json? [duplicate]
I have a Action Method like this
public ActionResult TodayJson()
{
DateTime today = DateTime.Today;
return Json(today,JsonRequestBehavior.AllowGet);
}
that ...
1
vote
1answer
42 views
Jquery getJSON is not working within MVC3
Hi I am trying to do a getJSON but for some reason it is silently failing.
Here is the code:
$("#distanceMiles").change(function () {
$("#distanceMiles ...
1
vote
1answer
22 views
Microsoft AJAX serialized dates with time swift
I have an MVC 3 web application for a web API, a controller emit json.
In the json result I see dates are being serialised automatically
as
{
Flag: "U"
EventId: ...
0
votes
1answer
40 views
Kendo UI or MVC JSON viewer, or Formatter to display JSON string
Is there a control or any other way to format a JSON string, that is to give different colours/ arrange/ indentations etc...
Please reply me if anyone have an idea about it.
Thank you
1
vote
0answers
17 views
MVC Displaying JSON Objects
I am getting a list of objects from a database
public class TestCode
{
/// <summary>
/// ProductID
/// </summary>
public int Id { get; set; }
public String CodeName { ...
1
vote
0answers
31 views
Trap message/exception in jquery to ELMAH
In my MVC3 application, I am returning messages from my stored procs. If it is 'successful', I'm moving forward else displaying a custom error page.
When the message is something else, I want to trap ...
1
vote
2answers
54 views
MVC 3 sending class JSON
My parameter KontrolkaSamTekstLista get null data to controller ActionResult KontrolkaSubmit() but all send action to ajax looks okay.
Class
using System.Collections.Generic;
namespace ...
0
votes
1answer
137 views
How can i auto complete a dropdown list using ajax in MVC
I'm trying to autocomplete a drop down list when someone types a postcode into a input field but I haven t been able to fill the dropdown list yet this is where I am:
JQuery
<script ...
1
vote
3answers
65 views
IIS responses with HTML instead of JSON on ASP .NET MVC3
The subject is selfexplanatory. I've developer and production environments. Developer env. is my localhost machine. I've action methods in contolers that sets response status code to 500 when ...
0
votes
1answer
49 views
Issues binding complex json model in MVC3 controller
I have been struggling to get this post to work in my project. Bascially, I am passing a list of Install objects ( an install object contains a list of Facility objects) to my controller. I have yet ...
-1
votes
0answers
82 views
how to add json data into jqgrid and how exactly jsonreader will work?
I am not able to populate JSON data in to jqgrid. No error is received, in the success callback I am getting expected output. Code:
<script language="javascript" type="text/javascript">
...
0
votes
2answers
43 views
Return value from controller using $.param in MVC
I am using asp.net MVC, in the application I update an image using the following:
Controller:
public ActionResult OutputHandler(int slide = 0)
{
FileContentResult data;
...
0
votes
1answer
37 views
How to POST some properties using an AJAX array?
I want to POST my array data through AJAX posting method.
For getting those values in an array, I have used a ViewModel.
My controller code is as::
[HttpPost]
public ActionResult ...
0
votes
1answer
62 views
Is it possible to bind a list of complex json objects to a C# object using an ajax GET request?
public class Person
{
public int Id { get; set; }
public string Name { get; set; }
}
public ActionResult Test (List<Person> persons)
{
...
}
Javascript:
var person = { Name: ...
0
votes
1answer
46 views
Save Controller Call Result as PDF
I'm developing an ASP.NET MVC3 application. I have a controller for file download:
public ActionResult PDF(string id)
{
try
{
// here I unzip a file, DownName comes from here
...
0
votes
1answer
42 views
Get Array of dates using Jquery MVC3
Guys I'm using JQuery UI date picker plugin for Reservation system. For this, I'm checking already booked dates using following script:
var bookedDays = ["2013-5-3", "2013-5-4"];
function ...
0
votes
0answers
29 views
JsonDotNetProviderFactory not working for JSON arrays
I need to post an array:
var projects = {"projects": [
{"id":17,"displayName":"Testing","stage":197,"health":205},
{"id":18,"displayName":"Test","stage":197,"health":205},
...
1
vote
1answer
149 views
ASP.Net MVC Model Binding to JSON in EditorFor
I want to be able to pass information from my view model to my controller via JSON in hidden textboxes. I'm working with polygons in the Google maps API. As the user edits the polygon, I am storing ...
3
votes
2answers
205 views
A circular reference was detected while serializing an object of type 'System.Reflection
I have an asp.net MVC 3 controller action method like this:
public JsonResult GetRecordingRates(int Id)
{
List<DefaultRateChart> defaultRateCharts = new ...
0
votes
2answers
109 views
When i use the window.close ajax call not working?
I have the small window in my page when click the button the window value send my controller and close the window. But when i use the window.close the controller not hit. But without window.close its ...
5
votes
3answers
265 views
Uncaught SyntaxError: Unexpected token B on live but not local server
So i am making some ajax post and it seems to work fine on the localhost, but when I publish it to ec2 server on amazon, I get Uncaught SyntaxError: Unexpected token B. Which seems to point to JSON ...
0
votes
0answers
52 views
What to do if the server refuse my connection?
WebClient oClient = new WebClient();
Stream oStream = oClient.OpenRead("http://finance.yahoo.com/d/result?f=c4l1&s=EURNOK=X");
StreamReader oReader = new StreamReader(oStream);
String sResult = ...
1
vote
0answers
65 views
Use json in script on the view in MVC3
I have the following problem:
First I have a method in the controller, which return PartialView with model in Json format.
Secondly I need to initialize the graphics (I using jqPlot - initialization ...
0
votes
1answer
19 views
Remote validation, value not getting to validation controller
I am trying MVC3 remote validation for the first time. i using it for the classic 'is that user name taken' scenario, and i am failing. I have checked the ajax info in chrome developer and it looks ...
1
vote
2answers
164 views
Rendering view using ViewModel or JSON object
My searching failed to find what I thought would be a well travelled subject. My options outlined at the bottom reflect some things I found.
I need to render a view from the server side as a ...
1
vote
1answer
101 views
Parsing Json array of object to c# array of class in MVC3
I'm trying to pass an array of objects from my view to my Controller. However each object only contains null values. I'm stuck.
My c# class:
public class CalendarColor
{
public string ...
1
vote
1answer
55 views
Access JSON returned by Controller in View
I am trying to serialize my linq to JSON.
My issue is
Json result wrapped in pre tag - how to get value of it. The answer is not what I am looking for though.
Here are my code
Controller
return ...
0
votes
1answer
107 views
$.parseJSON with JsonConvert.SerializeObject
What's the correct way of serializing .net class to json and using it in javascript ?
for example on server side we've got this:
public ActionResult Index()
{
var someClass = new ...
1
vote
0answers
158 views
Dialog reloading Partial - JQuery doesn't work (MVC 3)
When I open dialog all things work correct but when I close dialog and I try open this again I have got problem with JQuery (animation, hide etc.) Probably Partial View all the time is working and ...
1
vote
2answers
177 views
Why are my cascading dropdown lists not working? (ASP.NET [MVC 3])
I'm having problem with my cascading dropdownlist (DDL), it perfectly works fine when you choose the first DDL and when you select the second DDL the third DLL do not fire and the value is null.
...
0
votes
1answer
49 views
Binding JSON to a model MVC3
This is very frustrating I have looked at a number of examples yet I am still unable to receive any data on the server. I have the following JS
var checkoutModel = { };
$('form#card ...
0
votes
3answers
178 views
.NET MVC 4 JSON Post/Put char limit in Web.config
I am using the PUT verb to send JSON to a MVC controller. When I reach a certain limit I get a 500 error. If I scale back the JSON I send, then it sends just fine... Does anyone know of a ...
2
votes
3answers
190 views
knockout dates being reset on post to mvc controller
I have a knockout/mvc3 application. I am passing the date back to a controller.
controller
public ActionResult PackageUpdate(Package updatePackage){
\\do some stuff but dates are set to zero?
}
...
1
vote
2answers
59 views
No parameterless constructor Upload Image
I understand program need only this WrappedJsonResult2 UploadImageSmall() without parameter but I send parameter in UploadImage.
I change this code because I would like to have two UploadImage in ...
1
vote
1answer
47 views
JSON click event empty parameter
Parameter string Temat is empty when I click button where is problem? It's look OK?
file.cshtml
@using (Html.BeginForm())
{
<table class="edt" style="float: left; width: 600px; ...
0
votes
1answer
525 views
MVC 3 render partial view to a string to return with JSON [duplicate]
So i have a finished method that works and i use it all over the website:
public PartialViewResult GetBlogEntries(int itemsToTake = 5)
{
...
return PartialView("_BlogPost", model);
}
Now i ...
0
votes
1answer
51 views
How to replace the Div text with each each occurance of array element
Array contains following elements
1. abc
2. def
3. ghi
div text
this is abc - def some text
I want to repalce each occurance with <p> abc</p> like that
So final string will be like ...
0
votes
2answers
86 views
A circular reference was detected Linq
getting this error below
trying to have relation that says 1 post can have multiple postComments
A circular reference was detected while serializing an object of type ...
1
vote
2answers
298 views
How to create DataTable filled by JSON when number of columns is unknown
I have a table in my web-application, which is created like this:
<table id="mygrid">
<thead>
<th>Col1</th>
<th>Col2</th>
...
0
votes
1answer
456 views
JQuery getting JSON.parse: unexpected character
Hi I am getting the following error:
200
SyntaxError: JSON.parse: unexpected character
I have checked my JSON in firebug and it says the following:
jquery-1.8.3.js (line 2)
POST ...
0
votes
1answer
247 views
MVC3 and EF: How to handle CRUD operations of nested entities (Parent, Child and Grandchild)
I'm new to MVC 3 and Entity Framework so I'd like to know what is the best approach.
Basically, I have 3 entities: Course, Module and Chapter. Each is a parent of the next with a one to many ...
0
votes
0answers
202 views
How can I add a button or Label to a row in a EASYUI Data Grid? [closed]
How can I add a button or Label to a row in a EASYUI Data Grid?
0
votes
0answers
45 views
Data updating in Chrome and Firefox but not in Internet Explorers 7,8 & 9
I'm not sure if this is a knockout issue, a JSON issue or some other issue so I'll just explain it all.
I have a Web grid displaying a number of users. I can edit these members using a AJAX pop-up ...
0
votes
1answer
99 views
parse JSON response in IE9
In my MVC4 web app I'm using FineUploader to upload files.
When a file is uploaded I send a json response from my controller like so:
return this.Json(packageUploadResult, "text/plain", ...
0
votes
2answers
59 views
Facing issue while sending the JSON to Controller Action
I am trying to send the Json Data to my Controller Action.
JQuery
function SaveConnection() {
debugger;
var CardConnection = {
ConnectionDetails: []
};
var allConn = ...
1
vote
1answer
425 views
Creating a Data Grid using EASYUI with Json where data type Boolean
How can I show both of my boolean field at a time in Data Grid ?
Example: I wanna show "True" and "False" in the 1st and 2nd row of the Grid? but Grid will be loaded by JSON.
<table ...