Search Results

Search found 9394 results on 376 pages for 'mvc scaffolding'.

Page 32/376 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Missing Project Template after installing ASP.NET MVC 2

    - by DotNetHacker
    Hi, I have downloaded the ASP.NET MVC 2 Release version (using Web Platform Installer) as well as the downloading the file directly from the link in WPI. No error messages are reported after the install. When I go into Visual Web Developer and select Create New project I only the project reference to ASP.NET MVC version 1.0 and not version 2 (for clarity I have all the other project types, this is just in reference to the MVC projects). I have restarted, uninstalled and restarted and installed my PC multiple times and it still won't play. When clicking add a reference I can see the MVC.dll version 2.0.0.0 and add that no problem, but cannot manually upgrade the project since the ProjectTypeGuid used is not recognized. For reference I am using Visual Web Developer 2008 on Windows XP. ASP.NET MVC version 1.0 is working fine and without issue. Hope someone else can help. DNH

    Read the article

  • Why is Scaffolding Not Working in Ruby on Rails?

    - by Timmy
    I created a controller and a model. The controller is called "Admin" and the model is called "Album". I edited database.yml with proper info and did the rake db:migrate command which didn't return any errors and did migrate the db inside schema.rb. Inside the controller I wrote: class AdminController < ApplicationController scaffold :album end Next I started my server and went to http://localhost:3000/admin but instead of seeing the typical CRUD page I get the following error: app/controllers/admin_controller.rb:3 Request Parameters: None Show session dump --- flash: !map:ActionController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} Any idea why?

    Read the article

  • What benefits can I get upgrading my ASP.NET (Webform) + DAL(EF) + Repository + BLL structure to MVC?

    - by Etienne
    I'm in the process of defining an approach that may best fit our needs for a big web application development. For now, I'm thinking going with an ASP.NET Architecture with a DAL using Entity Framework, a Repository concept to not access DAL directly from BLL and a BLL that call the repository and make every manipulations necessary to prepare data to push in a presentation layer (.aspx files). I don't plan to use ASP.Net controls and prefer to keep things simple and lightweight using plain html, jQuery UI controls and do most of the server calls with jQuery Ajax. Sometimes, when needed, I plan to use handlers (.ashx) to call BLL methods that will return JSON or HTML to client for dynamic stuff. My solution also has a test project that Mock the Repository with in-memory data to not repose on database for testing BLL methods... It may be usefull to add that we will build a big application over this architecture with hundreds of tables and store procedures with a lot of reading and writing to database. My question is, having this architecture in mind, Is there any evident advantages that I can obtain by using an MVC3 project instead of the described architecture base on Webform? Do you see any problem in this architecture that may cause us problem during the next steps of development? I know the MVC pattern for using it in others projects with Django... but the Microsoft MVC implementation look so much more complex and verbose than Django MVC and it's why I'm hesitating (or waiting for a little push?) right now before jumping into it... We are in a real project with deadlines and don't want to slow the development process without any real benefits.

    Read the article

  • ASP.NET MVC and WCF

    - by Michael Stum
    I'm working my way into MVC at the moment, but on my "To learn at some point" list, I also have WCF. I just wonder if WCF is something that should/could be used in an MVC Application or not? The Background is that I want a Desktop Application (.NET 3.5, WPF) interact with my MVC Web Site, and I wonder what the best way to transfer data between the two is. Should I just use special Views/have the controllers return JSON or XML (using the ContentResult)? And maybe even more important, for the other way round, could I just call special controllers? Not sure how Authorization would work in such a context. I can either use Windows Authentication or (if the Site is running forms authentication) have the user store his/her credentials in the application, but I would then essentially create a HTTP Client in my Application. So while MVC = Application seems really easy, Application = MVC does seem to be somewhat tricky and a possible use for WCF? I'm not trying to brute-force WCF in this, but I just wonder if there is indeed a good use case for WCF in an MVC application.

    Read the article

  • Ajax inside Button Click (Getting parameter / Asp.NET MVC)

    - by Ph.E
    Greetings gentlemen I'm trying to implement the following code in my View, and unfortunately I'm not getting. The event is called, but I can not receive the parameter. Does anyone have any ideas? Method: <p><%= Html.AjaxButtonLink("btnExcluir","btnExcluir","Excluir", null, Url.Action("Excluir", new { IdMenu = Model.MenuInfo.Id_menu })) %></p> HTML: <p><input id="btnExcluir" name="btnExcluir" onClick="Sys.Mvc.AsyncHyperlink.handleClick(&quot;/Gerencial/MENUACAO/Excluir/60?IdMenu=60&quot;, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, httpMethod: 'Post' });" type="button" value="Excluir"></input></p> Controller: [ AcceptVerbs(HttpVerbs.Post) ] public ActionResult Excluir(string IdMenu) string IdMenu always come null! ================ Differences ActionLink: <p><a href="/Gerencial/MenuAcao/Excluir/60?IdMenu=60" onclick="Sys.Mvc.AsyncHyperlink.handleClick(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, httpMethod: 'Post' });">Excluir</a></p> My Button: <p><input id="btnExcluir" name="btnExcluir" onClick="Sys.Mvc.AsyncHyperlink.handleClick(&quot;/Gerencial/MENUACAO/Excluir/60?IdMenu=60&quot;, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, httpMethod: 'Post' });" type="button" value="Excluir"></input></p> Thanks

    Read the article

  • ASP.NET MVC on GoDaddy Not Working (Not Primary Domain Deployment)

    - by JPrescottSanders
    I am trying to get ASP.NET MVC working on GoDaddy and I'm not having much luck. I have read the post on SO that covers the subject, but I must have a slightly different configuration or must be missing somehting along the way because the main MVC page comes up, but all links seem to fail and no amount of tweaking the URLs seems to get it to work. A little back ground. I have a single hosting plan with many domains pointed to sub folders of the main domain. Basic ASP.NET web forms pages work just fine, but of course I wanted to try and host a sample MVC site in one of these non-primary domains. You can go to the URL here. As you can see this first page comes up, but if you click on Home or About it doesn't work. Clicking on Home creates this link "http://www.jprescottsanders.com/jps/" and clicking on about creates this link "http://www.jprescottsanders.com/jps/Home/About". As you can see JPS sneaks in there, this of course is the sub folder that i place my web app files in. I would like to know if this is a MVC related issue or a GoDaddy issue. I suspect that MVC may want to sit in the root directory of the site, and when it puts the "jps" into the URLs it breaks the routing mechanisms (but this is conjecture). I know Dan said this was possible so I'm hoping he sees this and helps me get to the bottom of this deployment strategy for MVC.

    Read the article

  • ASP MVC - Routing Required?

    - by evo_9
    I've been reading up on MVC2 which came in VS2010 and it sounds pretty interesting. I'm actually in the middle of a large multi-tenant application project, and have just started coding the UI. I'm considering changing to MVC as I'm not that far along at this point. I have some questions about the Routing capabilities, namely are they required to use MVC or can I more or less ignore Routing? Or do I have to setup a default routing record that will make things work like standard ASPX (as far as routing alone is concerned)? The reason why I don't want to use Routing is because I've already defined a custom URL 'rewrite' mechanism of my own (which fires on session_start). In addition, I'm using jquery and opens-standards for the entire UI, and MVC's aspx overhead-free approach seems like a better fit based on how I've already started to build the application (I am not using viewstate at all, for example). I guess my big concern is whether the routing can be ignored, of if I will have to re-implement my custom URL rewriting to work with MVC, and if that's the case, how would I do that? As a new Routing routine, or stick with the session_start (if that's even possible?). Lastly, I don't want to use anything even remotely 'intelligent/readable' for the url - for a site like StackOverflow, the readability of the URL is a positive, but the opposite is true if it's not a public website like this one. In fact, it would seem to me that the more friendly MVC routing URL (which indirectly show method names) could pose a security risk on a private, non-public website app like I'm developing. For all these reasons I would love to use the lightweight aspects of MVC but skip the Routing entirely - is this possible?

    Read the article

  • Odd Things of ASP.NET MVC Deployment on IIS 6

    - by misaxi
    Recently, I am a bit interested in the deployment of ASP.NET MVC application on IIS6 because Phil Haack posted an easier way to deploy ASP.NET MVC application on ASP.NET 4. So I decided to see how different version of ASP.NET MVC works on different version of ASP.NET. First off, I created an ASP.NET MVC 2 project in Visual Studio 2010 and deploy it to IIS 6 on Windows Server 2003 (only .NET framework 3.5 installed). I set the application to run in ASP.NET 2.0 and no extra stuff. Because I just wanted to see what sort of error would occur. And as expected, some error was reported as following. Then, I set the Copy Local attribute of System.Web.Mvc assembly to true as following and deploy again. As a result, the application ran smoothly. I had read tons of materials talked about the mess of deploying MVC application on IIS 6. And I did fight to tackle the deploying issues in my previous project. At least, if had used Extensionless Url in your application, you should have configured wildcard mapping in IIS. But in this case, I even didn’t have chance to do so. What the heck was going on exactly? Did I discover a new continent?

    Read the article

  • POP Forums v9 Beta 1 for ASP.NET MVC 3 posted to CodePlex!

    - by Jeff
    As promised, I posted a beta build of my forum app for ASP.NET MVC 3. Get the new goodies here: http://popforums.codeplex.com/releases/view/58228 This is the first beta for the ASP.NET MVC 3 version of POP Forums. It is nearly feature complete, and ready for testing and feedback. For previous release notes, look here, here and here.Check out the live preview: http://preview.popforums.com/ForumsSetup instructions are on the home page of this project. The new hotness in the beta, or what has been done since the last preview: All views converted to use Razor E-mail subscription/notification of new posts New post indicators/mark read buttons Permalinks to posts Jump to newest post (from new post indicators) Recent topics Favorite topics Moderator functions for topics (pin/close/delete, plus move and rename) Search, ported from v8. Not a ton of optimization here, or new unit testing, but the old version worked pretty well User posts (topics the user posted in) Forgot password Vanity items (signatures and avatars) Hide vanity items per user preference Some minor data caching where appropriate A little bit of UI refinement Lots-o-bug fixes Lots-o-unit tests What's next? The plan between now and the next beta is as follows: Continue working through features/tasks, and fix bugs as they're reported Integrate the forum into a real, production site Refine the UI Refactor as much as possible... the code organization is not entirely logical in some places After the second beta, a release candidate will follow, with a real "final" release after that. Subsequent releases should come relatively frequently and without a lot of risk. The trick in building this thing has been that it mostly tossed the previous WebForms version, which was all full of crusties. The time table for this is a little harder to pin down, as day jobs and families will have their effect. Other notes Refactoring will be a priority. As the features of MVC have evolved, so have my desires to use it in a fashion that makes things clear and easy to follow. I don't even know if anyone will ever start mucking around in the code, but on the off chance they do, I'd like what they find to not suck. Other nice-to-haves are builds to target Windows Azure and SQL CE. A nice setup UI would be super too. I think the ASP.NET MVC world has gone long enough without a decent forum.The biggest challenge that I've found is making the forum something that can be dropped in any app. While it does rope its views into an area, areas are mostly just routing details. I haven't thought of a clever way yet to limit dependency injection, for example, to just the forum bits. I mean, everyone should be using Ninject, but how realistic is that? ;)How much time and effort should you spend on POP Forums in its current state? Change is inevitable, but at this point I'm reasonably committed to not changing the database schema. I really think it will stay as-is. All bets are off for the various interfaces throughout the app, but the data should generally resist change. It's not even that different from v8, which was one of the original goals because I didn't want to rewrite SQL or introduce a new ORM or whatever. My point is that if you wanted to build a site around this today, even though it's not entirely functional, I think it's low risk in terms of data loss. I can't vouch for whether or not you know what you're doing.I've been having some chats with people lately about quoting posts, and honestly there has to be something better and straight forward. That continues to be a holy grail of mine, and some day, I hope to find it.Enjoy... it's starting to feel more real every day!

    Read the article

  • Deploying ASP.Net MVC 4 application to IIS 6 - Bundles are not working

    - by ShaneC
    We have a ASP.Net MVC 4 application we are trying to deploy to a Windows 2003 machine running IIS 6. We have it running on a separate app pool and it is setup to use asp.net 4.0. We have a Wildcard application mapping to aspnet_isapi.dll which was required to get the page to appear. The problem we've ran into now is that the bundling which is part of asp.net mvc 4 isn't working. When you try to follow the /js?v=ASDfljkFSDlkjDSF link you get a 404 returned to you. We know it uses extensionless urls but these should be handled by the Wildcard application mapping if I'm not mistaken? Has anyone got this working or have any ideas?

    Read the article

  • Creating a seperate static content site for IIS7 and MVC

    - by JK01
    With reference to this serverfault blog post: A Few Speed Improvements where it talks about how static content for stackexchange is served from a separate cookieless domain... How would someone go about doing this on IIS7.5 for a ASP.NET MVC site? The plan so far: Register domain eg static.com, create a new website in IIS Manually copy the js / css / images folders from MVC as is so that they have the same paths on the new server Enable IIS gzip settings (js/css = high compression, images = none) Set caching with far future expiry dates <clientCache cacheControlCustom="public" /> in the web.config Never set any cookies on the static.com site Combine and minimize js / css Auto deploy changes in static content with WebDeploy Is this plan correct? And how can you use WebDeploy to deploy the whole web app to one server and then only the static items to another? I can see there is a similar question, but for apache: Creating a cookie-free domain to serve static content so it doesn't apply

    Read the article

  • Asp.Net MVC2 RenderAction changes page mime type?

    - by Gabe Moothart
    It appears that calling Html.RenderAction in Asp.Net MVC2 apps can alter the mime type of the page if the child action's type is different than the parent action's. The code below (testing in MVC2 RTM), which seems sensible to me, will return a result of type application/json when calling Home/Index. Instead of dispylaying the page, the browser will barf and ask you if you want to download it. My question: Am I missing something? Is this a bug? If so, what's the best workaround? controller: public class HomeController : Controller { public ActionResult Index() { ViewData[ "Message" ] = "Welcome to ASP.NET MVC!"; return View(); } [ChildActionOnly] public JsonResult States() { string[] states = new[] { "AK", "AL", "AR", "AZ", }; return Json(states, JsonRequestBehavior.AllowGet); } } view: <h2><%= Html.Encode(ViewData["Message"]) %></h2> <p> To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>. </p> <script> var states = <% Html.RenderAction("States"); %>; </script>

    Read the article

  • MVC2 Areas and Controller 404

    - by CodeGrue
    My project namespace is MyProject.MVC So my controllers, which are segregated into Areas, are in this namespace: MyProject.MVC.Areas.AreaName But when I try to access a controller action in this namespace, I get a 404 error: http://MySite/AreaName/Action/View If I "remove" the MVC portion from the namespace on my controllers, everything works correctly. MyProject.Areas.AreaName Could I have things wired incorrectly or is this an issues with MVC2 Areas?

    Read the article

  • Use RedirectToAction in a JsonResult Action?

    - by CmdrTallen
    Hi, using ASP.NET MVC 1.0 and I have a action that returns a JsonResult and I need to redirect another action that also returns a JsonResult action type. The problem is the RedirectToAction() returns a RedirectToRouteResult class and seems there is no way to convert that to JsonResult class ? This is the error I am getting; Error 124 Cannot implicitly convert type 'System.Web.Mvc.RedirectToRouteResult' to 'System.Web.Mvc.JsonResult'

    Read the article

  • How to change id value when using Html.DropDownListFor helper in asp.net mvc 2.0?

    - by chobo2
    Hi I have a partial view that has something like this <%= Html.DropDownListFor(m => m.SelectedProductName, Model.ProductList, "Select a Product") %> Now you can create a new product and edit a existing product. Both editing and creating use the same form. The create is on the main page on load up. Edit popus up in a jquery u.i model dialog and renders a new partial view. So as far as the page is concerned is that I have 2 dropdown boxes with the same "id" which is bad since they should be unique. So how do I change the id? So when the edit loads it might have a id of "editSelectedProductName"? I tried to do this in the view model public string SelectedProductName{ get; set; } ViewModelConstructor() { SelectedProductName = "EditSelectedProductName"; } But it seems to not care and keeps using "SelectedProductName" as the product name. Thanks

    Read the article

  • ASP.NET MVC 2.0 Unused Model Property being called when posting a product to the server?

    - by Erx_VB.NExT.Coder
    i have my auto-generated linq to sql classes, and i extend this class using partial classing (instead of using inheritance), and i have properties that that i've put in later which are not part of the database model and should not be. these are things like "FinalPrice" and "DisplayFinalPrice" - in the dbase, there is only RetailPrice and WholesalePrice so FinalPrice etc are more like extensions of the dbase fields. when i submit the form with nothing filled in, "FinalPrice" gets called (the 'get' of the property) even tho i never ask for it to be, and even tho it is not needed. this happens before validation, so i don't even get the validation errors i would get. i've tried using and on the FinalPrice and FinalPriceDisplay properties - no go! why does this happen and how can i stop it from happening? is the modelstate just trying to validate everything so therefore it calls every item no matter what? for those interested, here is all the code... Partial Public Class tProduct 'Inherits tProduct Private Const CommissionMultiplier As Decimal = CDec(1.18) Private _FinalPrice As Decimal? Private _DisplayFinalPrice As String Private _DisplayNormalPrice As String Public Property CategoryComplete As Short <ScaffoldColumn(False)> Public ReadOnly Property FinalPrice As Decimal Get 'If RetailPrice IsNot Nothing OrElse WholesalePrice IsNot Nothing Then If _FinalPrice Is Nothing Then If RetailPrice IsNot Nothing Then _FinalPrice = RetailPrice Else _FinalPrice = WholesalePrice * CommissionMultiplier ' TODO: this should be rounded to the nearest 5th cent so prices don't look weird. End If Dim NormalPart = Decimal.Floor(_FinalPrice.Value) Dim DecimalPart = _FinalPrice.Value - NormalPart If DecimalPart = 0 OrElse DecimalPart = 0.5 Then Return _FinalPrice ElseIf DecimalPart > 0 AndAlso DecimalPart < 0.5 Then DecimalPart = 0.5 ' always rounded up to the nearest 50 cents. ElseIf DecimalPart > 0.5 AndAlso DecimalPart < 1 Then ' Only in this case round down if its about to be rounded up to a valeu like 20, 30 or 50 etc as we want most prices to end in 9. If NormalPart.ToString.LastChr.ToInt = 9 Then DecimalPart = 0.5 Else DecimalPart = 1 End If End If _FinalPrice = NormalPart + DecimalPart End If Return _FinalPrice 'End If End Get End Property <ScaffoldColumn(False)> Public ReadOnly Property DisplayFinalPrice As String Get If _DisplayFinalPrice.IsNullOrEmpty Then _DisplayFinalPrice = FormatCurrency(FinalPrice, 2, TriState.True) End If Return _DisplayFinalPrice End Get End Property Public ReadOnly Property DisplayNormalPrice As String Get If _DisplayNormalPrice.IsNullOrEmpty Then _DisplayNormalPrice = FormatCurrency(NormalPrice, 2, TriState.True) End If Return _DisplayNormalPrice End Get End Property Public ReadOnly Property DivID As String Get Return "pdiv" & ProductID End Get End Property End Class more... i get busted here, with a null reference exception telling me it should contain a value... Dim NormalPart = Decimal.Floor(_FinalPrice.Value)

    Read the article

  • ASP.NET MVC: How to transfer more than one object to View method?

    - by ile
    I finished NerdDinner tutorial and now I'm playing a bit with project. Index page shows all upcoming dinners: public ActionResult Index() { var dinners = dinnerRepository.FindUpComingDinners().ToList(); return View(dinners); } In DinnerRepository class I have method FindAllDinners and I would like to add to above Index method number of all dinners, something like this: public ActionResult Index() { var dinners = dinnerRepository.FindUpComingDinners().ToList(); var numberOfAllDinners = dinnerRepository.FindAllDinners().Count(); return View(dinners, numberOfAllDinners); } Of course, this doesn't work. As I'm pretty new to OOP I would need help with this one. Thanks, Ile

    Read the article

  • MVC routing - why does my request not match the route?

    - by Anders Juul
    Hi all, I'm making a request that I thought would be caught by my route, but there is no match. What am I doing wrong? Any comments appreciated, Anders, Denmark -- Url : EventReponse/ComingAdmin/386/01e71c45-cb67-4711-a51f-df5fcb54bb8b Expected match: routes.MapRoute( "Editing event responses for other user", // Route name "EventResponse/{action}/{eventId}/userId", // URL with parameters new {controller = "EventResponse", action = "ComingAdmin"} // Parameter defaults ); Desired controller (but I guess this does not come into play): public class EventResponseController : ControllerBase { (...) public ActionResult ComingAdmin(int eventId, Guid userId) { return RegisterEventResponse(eventId, AttendanceStatus.Coming, userId); } }

    Read the article

  • How to run a WebForms page and an MVC page in different files?

    - by Erx_VB.NExT.Coder
    when i try to do this and load the webforms page, i get this error, even tho the path is correct. what can i do to get past this? i've tried running the aspx page from the root as well. nada. Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /Views/Home/FileUploadFrame.aspx Version Information: Microsoft .NET Framework Version:4.0.30128; ASP.NET Version:4.0.30128.1

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >