Search Results

Search found 9325 results on 373 pages for 'mvc 2'.

Page 35/373 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • Routing classic asp through an MVC application

    - by Matthias
    We are starting to convert a large classic asp application into MVC (using C#). An additional requirement is, that all classic routes get "translated" to MVC ones ('mydomain.com/productdetail.asp?id=13' should become 'mydomain.com/products/13') even before we start writing the first controller or view. So basically, we want to use the routing from MVC but have the classic asp handle the response. An these are my questions: How to use the new nice urls but have the classic asp handle the construction of the html result? Within the classic asp page, the new MVC url pattern should be used for links. What is the best way of translating the old urls to the new ones and make the accessible within the classic asp site (using COM I guess). When an old/classic url is requested, how would I correctly handle that request so that browsers/searchengines would understand that the page has moved to the new url? Thanks in advance!

    Read the article

  • Upgrading framework on a ASP.Net MVC Solution

    - by Shiraz Bhaiji
    We have an ASP.Net MVC 1.0 solution developed using Visual Studio 2008 and .net Framework 3.5SP1. We would now like to upgrade Visual Studio to 2010. If we just open the solution in VS 2010 and do not change the framework version, can we just continue to develop as before? If we open the solution in VS 2010 and change the framework version to 4.0, will we automatically start using ASP.Net MVC 2.0, or will it continue to use ASP.Net MVC 1.0? Is there anything we need to take into consideration when upgrading to ASP.Net MVC 2.0? Thanks Shiraz

    Read the article

  • Routing classic asp and through an MVC application

    - by Matthias
    We are starting to convert a large classic asp application into MVC (using C#). An additional requirement is, that all classic routes get "translated" to MVC ones ('mydomain.com/productdetail.asp?id=13' should become 'mydomain.com/products/13') even before we start writing the first controller or view. So basically, we want to use the routing from MVC but have the classic asp handle the response. An these are my questions: How to use the new nice urls but have the classic asp handle the construction of the html result? Within the classic asp page, the new MVC url pattern should be used for links. What is the best way of translating the old urls to the new ones and make the accessible within the classic asp site (using COM I guess). When an old/classic url is requested, how would I correctly handle that request so that browsers/searchengines would understand that the page has moved to the new url? Thanks in advance!

    Read the article

  • jquery with ASP.NET MVC - calling ajax enabled web service

    - by dcp
    This is a bit of a continuation of a previous question. Now I'm trying to make a call to an AJAX enabled web service which I have defined within the ASP.NET MVC application (i.e. the MovieService.svc). But the service is never being called in my getMovies javascript function. This same technique of calling the AJAX web service works ok if I try it in a non ASP.NET MVC application, so it makes me wonder if maybe the ASP MVC routes are interfering with things somehow when it tries to make the AJAX web service call. Do you have any idea why my web service isn't getting called? Code below. <script src="<%= ResolveClientUrl("~/scripts/jquery-1.4.2.min.js") %>" type="text/javascript"></script> <script src="<%= ResolveClientUrl("~/scripts/grid.locale-en.js") %>" type="text/javascript"></script> <script src="<%= ResolveClientUrl("~/scripts/jquery-ui-1.8.1.custom.min.js") %>" type="text/javascript"></script> <script src="<%= ResolveClientUrl("~/scripts/jquery.jqGrid.min.js") %>" type="text/javascript"></script> <script type="text/javascript"> var lastsel2; function successFunction(jsondata) { debugger var thegrid = jQuery("#editgrid"); for (var i = 0; i < jsondata.d.length; i++) { thegrid.addRowData(i + 1, jsondata.d[i]); } } function getMovies() { debugger // ***** the MovieService#GetMovies method never gets called $.ajax({ url: 'MovieService.svc/GetMovies', data: "{}", // For empty input data use "{}", dataType: "json", type: "GET", contentType: "application/json; charset=utf-8", success: successFunction }); } jQuery(document).ready(function() { jQuery("#editgrid").jqGrid({ datatype: getMovies, colNames: ['id', 'Movie Name', 'Directed By', 'Release Date', 'IMDB Rating', 'Plot', 'ImageURL'], colModel: [ { name: 'id', index: 'Id', width: 55, sortable: false, hidden: true, editable: false, editoptions: { readonly: true, size: 10} }, { name: 'Movie Name', index: 'Name', width: 250, editable: true, editoptions: { size: 10} }, { name: 'Directed By', index: 'Director', width: 250, align: 'right', editable: true, editoptions: { size: 10} }, { name: 'Release Date', index: 'ReleaseDate', width: 100, align: 'right', editable: true, editoptions: { size: 10} }, { name: 'IMDB Rating', index: 'IMDBUserRating', width: 100, align: 'right', editable: true, editoptions: { size: 10} }, { name: 'Plot', index: 'Plot', width: 150, hidden: false, editable: true, editoptions: { size: 30} }, { name: 'ImageURL', index: 'ImageURL', width: 55, hidden: true, editable: false, editoptions: { readonly: true, size: 10} } ], pager: jQuery('#pager'), rowNum: 5, rowList: [5, 10, 20], sortname: 'id', sortorder: "desc", height: '100%', width: '100%', viewrecords: true, imgpath: '/Content/jqGridCss/redmond/images', caption: 'Movies from 2008', editurl: '/Home/EditMovieData/', caption: 'Movie List' }); $("#bedata").click(function() { var gr = jQuery("#editgrid").jqGrid('getGridParam', 'selrow'); if (gr != null) jQuery("#editgrid").jqGrid('editGridRow', gr, { height: 280, reloadAfterSubmit: false }); else alert("Hey dork, please select a row"); }); }); </script> <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> <table id="editgrid"> </table> <div id="pager" style="text-align: center;"> </div> <input type="button" id="bedata" value="Edit Selected" /> Here's my RegisterRoutes code: public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("*MovieService.svc*"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); } Here's what my MovieService class looks like: namespace jQueryMVC { [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class MovieService { // Add [WebGet] attribute to use HTTP GET [OperationContract] [WebGet(ResponseFormat = WebMessageFormat.Json)] public IList<Movie> GetMovies() { return Persistence.GetMovies(); } } }

    Read the article

  • Map the physical file path in asp.net mvc

    - by rmassart
    Hi, I am trying to read an XSLT file from disk in my ASP.Net MVC controller. What I am doing is the following: string filepath = HttpContext.Request.PhysicalApplicationPath; filepath += "/Content/Xsl/pubmed.xslt"; string xsl = System.IO.File.ReadAllText(filepath); However, half way down this thread on forums.asp.net there is the following quote HttpContext.Current is evil and if you use it anywhere in your mvc app you are doing something wrong because you do not need it. Whilst I am not using "Current", I am wondering what is the best way to determine the absolute physical path of a file in MVC? For some reason (I don't know why!) HttpContext doesn't feel right for me. Is there a better (or recommended/best practice) way of reading files from disk in ASP.Net MVC? Thanks for your help, Robin

    Read the article

  • .net 4.5 Asp Mvc -> Error 403.14- IIS 7 - Windows Server 2008 R2

    - by Boas Enkler
    When I want to deploy an MVC 4 (.net 4.5) application to my iis i got the 403.14 calling me that the content ist not browseable. This also occurs when i deploy the unchanged mvc 4 template. when using the mvc 4 template with .net 4.0 everything works. I checked the other posts but can't figure out the solution. ist set i ran aspnet_regiss -i which completed without any errors. the only strange thing is that .net 4.5 is installed in the .net 4.0 directory %windows%/microsoft.net/Framework64/4.0.30319 From this folder i also ran aspnet_regiis. to ensure that 4.5 is installed i restarted the .net 4.5 setup and it tells me taht it is installes Also the apppools show me 4.0.30319 as version. There is an other application targeting mvc with 4.5 which runs. but i don't know wether it was created with a 4.0 templated and retargeted to 4.5 Any hints? The app.config is the unchanged default from the mvc 4 template. I just tested to create a subfolder which i convert to an application. placing the site there makes it working. But why not on root folder?

    Read the article

  • Is it possible to share a masterpage between MVC and webforms?

    - by Craig Quillen
    I am adding MVC to a project that has MANY legacy webform pages. This works fine. However, I currently have a separate masterpage for MVC and for the webforms. The two master pages produce essentially identical output. I'd really like to kill the webforms one and just use the MVC master page with all my pages and stay DRY. Not being DRY has already bitten me a couple times when I forgot to change both. I tried doing the obvious way and just pointing the webform content page's MasterPage attribute at the MVC masterpage. This throws an error saying the MVC masters only work with MVC views. This seems like it would be a pretty common problem with mixed MVC and webform projects. My MVC master isn't doing anything with ViewData, so I don't see any reason the webforms couldn't use them.

    Read the article

  • Use html files from another project in ASP.NET MVC

    - by Stacey
    I know that I can use normal html files in ASP.NET MVC; however I have a situation where several (above 20) html files are needed for static display. This is fine and good, but I really don't want it cluttering the MVC project since none of them will have controller actions. Is there any way to load up a second project and use static html files from it, within ASP.NET MVC?

    Read the article

  • Is WordPress MVC compliant?

    - by kovshenin
    Some people consider WordPress a blogging platform, some think of it as a CMS, some refer to WordPress as a development framework. Whichever it is, the question still remains. Is WordPress MVC compliant? I've read the forums and somebody asked about MVC about three years ago. There were some positive answers, and some negative ones. While nobody knows exactly what MVC is and everybody thinks of it in their own way, there's still a general concept that's present in all the discussions. I have little experience with MVC frameworks and there doesn't seem to be anything about the framework itself. Most of the MVC is done by the programmer, am I right? Now, going back to WordPress, could we consider the core rewrite engine (WP_Rewrite) the controller? Queries & plugin logic as the model? And themes as the view? Or am I getting it all wrong? Thanks ;)

    Read the article

  • How to inherit from a library in a MVC.NET view

    - by Dofs
    I am trying to implement CKFinder in my MVC.Net website, but the default setup only works for regular asp.net websites, so I am trying to alter it to work. One page inherits from a library CKFinder.Connector.Connector. In the old days my aspx would just inherit="CKFinder.Connector.Connector", but how is this done in MVC.NET? Is Inherits="System.Web.Mvc.ViewPage<CKFinder.Connector.Connector>" the same?

    Read the article

  • Assigning a MVC Controller property from Asp.Net page

    - by JasonMHirst
    I don't know if I've understanding MVC correctly if my question makes no sense, but I'm trying to understand the following: I have some code on a controller that returns JSON data. The JSON data is populated based on a choice from a dropdown box on an Asp.Net page. I thought (incorrectly) that Session variables would be shared between the Asp.Net project and the MVC Project. What I'd like to do therefore (if this is possible), is to call a Sub on the MVC that sets a variable before the JSON query is run. I have the following: Sub SetCountryID(ByVal CountryID As Integer) Me.pCountrySelectedID = CountryID End Sub Which I can call by the following: Response.Write("http://localhost:7970/Home/SetCountryID/?CountryID=44") But this then results in a blank page - again obviouslly totally incorrect! Am I going about MVC the wrong way or do I still have a hell of a lot more learning to do? Is this even possible to do?

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >