Hi All, I'm attempting to change the data in PartialView within my view via a dropdownlist change in the form. Now if I hit the submit button my form posts no problem and the formcollection is available, however when I try to submit via jquery on a change event the form submits alright but no formcollection
Any ideas?
This is the submi...
I have a OrderService that I use in my controllers.
What I did was just inherit from a custom controller where I added the OrderService as a property. I initialize the OrderService in the OnActionExecuting event.
When initializing the OrderService, I set the Order property.
This is because the OrderService performs actions on a Order...
I have a simple comparison in my view to see if an event is in the past:
<% if (model.EventDate < DateTime.Now)
{ %>
<td style="color: red;">
<% }
else
{ %>
<td>
<% } %>
This works fine on my dev machine, running via Cassini, but on the server it seems to be interpreting 01/12/2010 as Dec. 1, not Jan 12.
Ho...
THe variable email below is used twice: first inside the <p> tag, and then is passed as a value of a textbox.
Question: Will both occurencies yield the same text? Believe it or not - they are different.
#UserProfileEditForm form = (UserProfileEditForm)ViewData["form"];
#string email = form.email;
<p>Email: ${HttpUtility.HtmlEncode(ema...
I have an issue where I'm generating links for my MVC app in a custom HtmlHelper, and RouteLink isn't aware that the MVC application has a virtual directory. This means I can debug and use the app fine in testing, but it generates invalid links in production. Is there a way to get RouteLink() or ActionLink() to include the virtual direct...
Have you ever learned two new technologies at the same time? I'm learning Java at work and ASP.NET MVC at home. Are there any pitfalls to learning two technologies at the same time? What about some benefits? Do you find yourself fighting burnout?
...
I have deployed an ASP.NET MVC application following the article How to: Deploy an ASP.NET MVC Application. The index page for the app pulls up correctly rendering images, loading JavaScript and CSS. Unfortunately, none of the links work. I thought this Stack Overflow question ASP.NET MVC deployment to IIS 5/6 with Virtual Directory woul...
Yet another multi tenancy post im afraid.
I just cant find a good solution to my problem, I have read all the great posts on multi tenancy for ASP MVC but I still need some good advice.
Im going to create a corporate presence for one of my customers. Their company structure is like a main company (ex. Acme Group Ltd.) which own several ...
I want to get a value from the user session and display it in the site.master file. How can I do this so that every view page has this value? Do I have to place ViewData["MyValue"] in every controller action? Is there a global way of doing this in one place so I don't have to have the same code in every controller action?
...
Hi guys, I'm trying to pass a DTO with one navidation property IEnumerable<> inside of it, when I pass an object without child lists it works well, but, when I'm passing objects with childs and grandchilds the WCF services does not respond and gives me no error. I have to make something to work with this type of object specificly?
Here'...
I have a view model class that looks something like this
public class ViewModel
{
public string Name { get; set; }
public IList<SubViewModel> Subs { get; set; }
}
public class SubViewModel
{
public string Name { get; set; }
public bool IsSet { get; set; }
public int Id { get; set; }
}
In my HTML I then have
<%= H...
I have a custom SiteMapProvider (populated from database) and a custom AuthorizeAttribute (validates current users roles + requested page against Role_Page database) for controller classes.
I have to implement the function SiteMapProvider.IsAccessibleToUser(context, node). I also have to implement AuthorizeAttribute.AuthorizeCore(contex...
I have some code like this:
return helper.DropDownList(data.ModelEntityId.ToString(), selectList, null, new { onchange = onChange });
Where the onChange variable can be nothing, or loaded from some metadata. This works, however I also want to apply the javascript function to an onload event for that control also.
Is there a way way ...
I am trying to use asp.net MVC controllers JsonResult to CRUD db records.
e.g.
GET /Config/Folder/1 - will return a json serialized LinqToSql entity
POST /Config/Folder - will send form data back to the server to be deserialized and persisted back to the database.
I am using james newton-kings JSON.net to serialize the entity, althou...
I've been working with MVC 1 for some time now and have decided to finally give MVC 2 a shot.
My question is, for those who have been using 2 for some time what are the features or areas I should be looking at first?
I know there's a bunch of new stuff in there but would like to target my learning to specific areas rather than go looki...
Ninject's site only has version 1.0
where can I get the one that has ninject.framework.mvc libriaries?
...
I have a commerce application, asp.net mvc.
I want it to be extensible in the sense others can create other payment providers, as long as they adhere to the interfaces.
/blah.core
/blah.web
/blah.Authorize.net (Implementation of a payment provider using interfaces Ipaymentconfig and paymentdata class)
Now the problem is this:
/blah...
Hi,
I'm using ASP.NET MVC 2.0.
I need to implement a dynamic form in order to add "on the fly" new form table row.
My ViewModel contains an ICollection according to each rows which will be added to the form.
Now how can i make client side validation with that mechanism ?
...
Will MVC 2 run on .net framework version 4.0 or 3.5 sp1? Has Microsoft even made an announcement yet as to what the requirements are?
Also, Will MVC 2 be an installation separate from .net 4.0 or will it be installed with 4.0?
...
I have a transaction attribute that performs a commit in the onactionexecuted method.
This is specified at the controller method, for one of my actions i need to override that method and not call the code in onactionexecuted?
Here is some sample code.
[Transaction]
public class TestController
{
public ActionResult Index()
{
...