Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/07/2016, 08:24
oconner999
 
Fecha de Ingreso: mayo-2011
Mensajes: 12
Antigüedad: 13 años
Puntos: 1
Respuesta: registro de boostratp en MVC 4 con visual 2013

bueno aca dejo alguna imagenes y explico lo q no puedo realizar
en este imagen muestro q ya tengo instalado bootstrap


ahora como avia dicho en otros foro lei q tengo q agregar bootstrap en mi clase bundleconfig y registrarlo en la otra class global.asax aca dejo las clases de como las tengo y nose se la verdad como empesar y que aumentar para q puede funcar bootstrap correctamente

Código ASP:
Ver original
  1. using System.Web;
  2. using System.Web.Optimization;
  3.  
  4. namespace MvcApp2
  5. {
  6.     public class BundleConfig
  7.     {
  8.         // Para obtener más información acerca de Bundling, consulte http://go.microsoft.com/fwlink/?LinkId=254725
  9.         public static void RegisterBundles(BundleCollection bundles)
  10.         {
  11.             bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
  12.                         "~/Scripts/jquery-{version}.js"));
  13.  
  14.             bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
  15.                         "~/Scripts/jquery-ui-{version}.js"));
  16.  
  17.             bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
  18.                         "~/Scripts/jquery.unobtrusive*",
  19.                         "~/Scripts/jquery.validate*"));
  20.  
  21.             // Utilice la versión de desarrollo de Modernizr para desarrollar y obtener información sobre los formularios. De este modo, estará
  22.             // preparado para la producción y podrá utilizar la herramienta de creación disponible en http://modernizr.com para seleccionar solo las pruebas que necesite.
  23.             bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
  24.                         "~/Scripts/modernizr-*"));
  25.  
  26.             bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));
  27.  
  28.             bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
  29.                         "~/Content/themes/base/jquery.ui.core.css",
  30.                         "~/Content/themes/base/jquery.ui.resizable.css",
  31.                         "~/Content/themes/base/jquery.ui.selectable.css",
  32.                         "~/Content/themes/base/jquery.ui.accordion.css",
  33.                         "~/Content/themes/base/jquery.ui.autocomplete.css",
  34.                         "~/Content/themes/base/jquery.ui.button.css",
  35.                         "~/Content/themes/base/jquery.ui.dialog.css",
  36.                         "~/Content/themes/base/jquery.ui.slider.css",
  37.                         "~/Content/themes/base/jquery.ui.tabs.css",
  38.                         "~/Content/themes/base/jquery.ui.datepicker.css",
  39.                         "~/Content/themes/base/jquery.ui.progressbar.css",
  40.                         "~/Content/themes/base/jquery.ui.theme.css"));
  41.         }
  42.     }
  43. }

y la clase global.asax

Código ASP:
Ver original
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Http;
  6. using System.Web.Mvc;
  7. using System.Web.Optimization;
  8. using System.Web.Routing;
  9.  
  10. namespace MvcApp2
  11. {
  12.     // Nota: para obtener instrucciones sobre cómo habilitar el modo clásico de IIS6 o IIS7,
  13.     // visite http://go.microsoft.com/?LinkId=9394801
  14.  
  15.     public class MvcApplication : System.Web.HttpApplication
  16.     {
  17.         protected void Application_Start()
  18.         {
  19.             AreaRegistration.RegisterAllAreas();
  20.  
  21.             WebApiConfig.Register(GlobalConfiguration.Configuration);
  22.             FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
  23.             RouteConfig.RegisterRoutes(RouteTable.Routes);
  24.             BundleConfig.RegisterBundles(BundleTable.Bundles);
  25.         }
  26.     }
  27. }

y por ultimo pongo mi layout q se q tengo q referenciar mis bundle pero vuelvo a decir q nose como

Código HTML:
Ver original
  1. <!DOCTYPE html>
  2.     <meta charset="utf-8" />
  3.     <meta name="viewport" content="width=device-width" />
  4.     <title>@ViewBag.Title</title>
  5.     @Styles.Render("~/Content/css")
  6.     @Scripts.Render("~/bundles/modernizr")
  7. </head>
  8.  
  9.  
  10.     @RenderBody()
  11.  
  12.     @Scripts.Render("~/bundles/jquery")
  13.     @RenderSection("scripts", required: false)
  14. </body>
  15. </html>