Feuerwehr Sim - Tegenpockel - Wir - uns
A:
If you look in the menu system, there is an option to "change to English".
Feuerwehr Simulator 2010
Emergency Services Sim. Screenshot.
game language: English. Games similar to Flight Catastrophe. Emergency 5
Here is a screenshot from my simulator.
Q:
C# Enum not recognized in JavaScript code
I'm using Asp.net MVC 4 in my application and have used enums to allow different tab selection for an individual page.
I have a Model object which contains enum values, when I retrieve this object from my controller in my view I want to pass the object containing the enum values to my JavaScript function on a particular view.
The issue is, for some reason, the enum is being ignored by JavaScript and when the object is sent, the enum is null.
I am passing the object with the enum from my controller to my view using ViewBag and it is being retrieved by the view.
Here is the controller method that retrieves the object containing the enum values and I have passed this object to my view using ViewBag.
[HttpGet]
public ActionResult Index()
{
var myObject = myRepository.GetMyObject();
ViewBag.Object = myObject;
return View();
}
And here is the JavaScript function that I am trying to use the enum values.
$(document).ready(function() {
$("#tabs a").click(function(e) {
e.preventDefault();
var id = $(this).attr("href");
$(id).load($(id).attr("href"));
});
});
Any help would be appreciated as I have searched high and low for a solution.
Thanks,
Steve
A:
Enums are not supposed to be visible to the client. Instead, I suggest you use JavascriptSerializer. Deserialize the string containing your enum into a JavaScript object and then use that object.
For example:
$.ajax({ be359ba680
Related links:
Comments