I tried to use the solution explained at http://weblogs.asp.net/paulomorgado/archive/2010/01/31/web-site-globalization-with-asp-net-routing.aspx to localize my application using the language parameter in my routes.
Here's the code I have in my Global.asax:
public static void RegisterRoutes(RouteCollection routes)
{
routes.I...
i have an asp.net mvc view where the top of the page is a table. What i want is to click on a row in the table which will go to the server and get back details on that table. This is working fine and i am returning the details in Json.
The issue is i know want to show a details panel below. Right now i have the details pane all com...
I have an ActionResult in some controller and i want to return a view from another controller
I am doing this:
return View(VirtualPathUtility.ToAbsolute(@"~/Views/Order/Index.aspx"));
I see that page (there is a jqgrid on it) but not fully loaded, jqgrid makes an ajax request to get the data but the request fails, thing which doesn't ...
Hello Freinds I am new to this Asp.net MVC Control..
I have a page which I implemented previously using Jquery I am dispalying the data in grid control.
now I need to change that Jquery grid to Telerik grid..
I included Script in aspx page as weel as I aded telrik dll in my References..
I added all the telrik specification to the sit...
I'm trying to render a radio button list in MVC 2 RC 2 (C#) using the following line:
<%= Html.RadioButtonFor(model => Enum.GetNames(typeof(DataCarry.ProtocolEnum)),
null) %>
but it's just giving me the following exception at runtime:
Templates can be used only with field access, property access, single-dim...
My group builds internally hosted ASP.NET MVC websites with forms-authentication.
I'd like to host a WCF service in the same virtual directory as an ASP.NET MVC website.
My Question:
How do I make the WCF service freely
accessible, that is without
forms-authentication.
My current predicament is this:
I can access the .svc a...
Hello!
I want to be able to update fields of my models by showing the values and then having a little "edit" button next to it, which would turn the label into textbox/dropdownlist and the edit button should disappear and instead show a Save and Cancel buttons. The save and cancel buttons should disappear when you click on them or on an...
How can I call the Session in ViewModel?, Reference to "Session [...]" or " HttpContext.Session [..]" not exist in this context
...
I have need of a simple view that let's the user set the date of something. In MVC I can pass the date via ViewData. I want to use the asp:Calendar control (I think). Should I instantiate the control and pass the entire control via ViewData or can I make it in the view and just pass a date over? Once the user is OK with the date will it ...
Does anyone have any insight on what's going on here? Here is my clientside jquery 1.4.1 code:
$.ajax({
type: "POST",
url: "PrintBOL/Print",
data: [1, 2, 3],
contentType: "application/json; charset=utf-8",
dataType: "json",
error: function(xmlHttpRequest, status, errorThrown) {
console.debug(xmlHttpReque...
I'm trying to use DataAnnotations to add validation to my models in asp.NET MVC 2 RC2, using TryUpdateModel
var user = UserManager.Find(id);
this.TryUpdateModel<IProvisioningObject>(user, form.ToValueProvider());
This updates the model, but the validation is never called. I tried using TryUpdateModel as well (which is...
Greetings,
I'm a bit of an MVC noob. I'm trying to create a simple application where a client logs in and votes on something. Nothing complicated. I have a strongly typed View where I pass a VoteModel class this class contains a collection of VoteStructures. The Vote structure just contains an (int) ID, a description, and if it's ...
I'd like to glue my custom permissioning system into a new ASP.NET MVC app. I've done a fair amount of work writing my own custom AuthorizeAttribute for the app. I've also written my own custom MembershipProvider and RoleProvider implementations. All of this works beautifully, up until I need to check the Roles my user is a part of.
I d...
I need to give end-users the ability to securely edit an asp.net mvc web application templates and so far Liquid Template Language seems to be perfect, but it is written in Ruby and porting it seems a too complex task for me as I don't know Ruby... anyone tried to port it to C#? It would be really useful in a lot of situations and I'm go...
I have a form which allows me to upload a picture plus some other data.. in my database I just save a string of the filename... now, when Im editing the same model, should I just let UpdateModel do its job or do I have to specify
modelobject.picture=file.Filename
Something is wrong with my edit form and Im not sure how exactly to deb...
Hi all,
Here's my javascript code:
<script type="text/javascript">
$(document).ready(function() {
var currentInput = '';
var currentLabel = '';
$("#userLookup").click(function() {
var url = "<%= Url.Action( "ListAll" , "User") %>";
currentInput = $("#User");
currentLabel...
I want to display the YSOD when it would be providing useful information during development or locally on the servers but a semi-generic page in other cases. I know that I could set the defaultRedirect attribute of the application's <customErrors> configuration tag in web.config, but I would rather do some processing to generate a page w...
In my Controller I have been setting
ViewData.Model = DBModel.Table.Take(1).Single();
Where DBModel is create by DBML file of Linq-to-SQL
And I can access the Value thro' ViewData.Eval("ColumnName"),
But If I create my own class
Class Test{
public string Col = "Testing ViewData";
}
Test objTest = new Test();
ViewData.Model = o...
I am trying to integrate S#arp Architecture with NServicebus but I am getting some errors.
Anyone already used both projects together? Any examples about that?
The Ibus seems to be correctly instantiated but I am getting this error when I call the bus.Send(message).
System.NullReferenceException: Object reference not set to an instanc...
Hi,
I try using a RedirectToAction after I have done a post to the controller and saved but the url does not chnage and the redirect dsoes not seem to work.....I need to add that the redirect does enter the controller action method when I debug but like I said it does not change the url or navigate to the "Index" view...
public ViewRes...