Hi Experts,
I am currently working on a project that consists of an ASP.NET MVC 2.0 front end and has been developed in VS 2008. I have been messing around with the Web Deployment Project to deploy the application so we can also change various Web.config settings based on the build configuration.
However, when the deployment project pu...
Ok, I've been trying to get this working for a few now and thought enough is enough and leave it to you guys to help. Depending on what I click, true or false, this will cause my table to show or hide accordingly. My issue is, if i cancel(close) out of this while the selected is "true", and come back to this, "true" will still be selecte...
I have a form generator essentially, what I want to do is take the forms list of questions, dynamically generate them on the page, then retrieve the answers. Generating the questions is easy, but how do I retrieve those answers? I don't see how I can strongly type the view, but is there a way to manually grab the post values if I know ...
I have an ASP.NET MVC2 application that uses a parent controller to setup specific variables that are used around the app. I also implement validation to make sure that an ID in the URI exists in the database. If it does not, I redirect and stop the execution of the script.
My parent controller looks something like this:
// Inside c...
I am starting asp.net MVC2 by going through a few tutorials, but they are all too basic when trying to apply this to my real world problem.
I have been following a tutorial based on a simple one table database. I build the data model using ADO.NET Entity Data Model and select to generate the model from database. Then I make a controller...
<script type="text/javascript">
$('#TextEdit').click(function () {
$('#ObnAdd').val('Save');
});
</script>
<% using (Html.BeginForm("Create", "ObnTextComponents",FormMethod.Post,new {@id = "TheForm"}))
{%>
I need to check the condition if my ObnAdd Button text is Add need to go Create ActionResult
if ...
I'm trying to write REST-behaviour into my ASP.NET MVC2 app, but I'm having a hard time figuring out how to make the routes work as I want.
I'd like my routing to work like this:
/Users/Get/1 <- returns a regular HTML-based reply
/Users/Get.xml/1 <- returns the data from Get as XML
/Users/Get.json/1 <- returns the data as JSon
I've t...
Hello!
We are about to start a new project. It will be a group of web aplications with a good number of shared components. It will have up to 50.000 unique users visits per day and It will be some kind of management panel. All projects will be build in asp.net mvc 2 and they will all work on the one SQL Server database.
We've been very...
Hi,
I have a small ASP.Net MVC 2 project that contains two areas as well as some shared views. In my root HomeController, I have added the HandleError attribute and when I throw an exception in one of the actions, I get redirected to the Error.aspx page.
I have another controller, TitlesController, that resides under an Area and when ...
UPDATE 2
Ok - So it looks like my question is changing again slightly :-)
I've realised now that UrlHelper.Action doesn't seem to correctly resolve the URL in any Area unless the area name is explicitly specified. If it's not specified it seems to return whatever area name we're currently in which makes it look like it's working from o...
Hello everyone, for some reason I cant get my events to have start and end on them except for the first event that shows during recurrence. Does anyone have any idea why this is so? I have a working example that shows what I'm talking about.
http://jsbin.com/usori3/11/edit
...
I would like to know if it's possible to bypass the validation of one property which is using Data Annotations. Since I use the model across multiple pages, there's a check I need in some, but not in others, so I would like it to be ignored.
Thaks!
...
We had a View Model that looked like this:
public class myViewModel {
public Contract contract {get;set;}
public Vendor vendor {get;set;}
}
public class Contract {
public int contractID {get;set;}
// ... various string properties
public IList<ContractDetail> contractDetails {get;set;}
pubilc Vendor vendor {get;s...
Has anyone ran into this issue?
We have a mobile site that can't use JavaScript based tracking for Google Analytics, so we have to use the solution found here:
http://code.google.com/mobile/analytics/docs/web/#asp
However, it doesn't appear to be logging any data over the last few days.
This is the code being used:
public class Goo...
I have a new MVC 2 site that has been working fine on my local box but has a path issue when published to an IIS 7.5 server. The site pulls up fine, navigation links such as
<ul id="menu">
<li><%: Html.ActionLink("Home", "Index", "Home")%></li>
<li><%: Html.ActionLink("Search", "Index", "Search")%></li>
...
Similar question: Link
The question above is partly what I'm looking for except that it seems very VERY verbose instead of being MVC2-ey. Maybe with MVC2 there is a simpler more 'convention over configuration' approach?
How can I easily set up my MVC2 application to show a particular 404 page when a user types in a non-existant vie...
I have cornered this error down to a redirect action call by DotNetOpenAuth(http://www.dotnetopenauth.net/)
Basically I have implemented the example here
http://www.dotnetopenauth.net/developers/code-snippets/programmatic-openid-relying-party/
In my application while running locally I hit this line
return request.RedirectingResponse...
I am having an issue where UrlHelper's RouteUrl method only returns an empty string when run in my tests, though function properly when executing in the real HttpContext. It is, however, finding the route - as I do properly get an exception if I try to resolve a route name which has not been defined.
I have mocked the HttpContext and fr...
In my specific example, I need to pass an error received on one controller to another controller where it will be display. Here is a test case I set up. I've tried TempData, ViewData and Session. One other thing I noticed is that maybe it's the way I'm redirecting. When I put a breakpoint on the receiving controller if I just go to i...
I have added data annotations to a 'buddy' class as referenced in MS guidance. In particular, the [DisplayName ("Name")] does not seem to be affecting anything. My understanding is that the value assigned to the annotation should be referenced and used by the Html.LabelFor(m => m.Attribute) helper to display the label for the field.
Am...