Tag: twitter bootstrap

使用Twitter Bootstrap,C#,asp.net和javascript上传文件

链接到Jasny http://jasny.github.com/bootstrap/javascript.html#fileupload 链接到表单的样子http://img507.imageshack.us/img507/3308/picpx.png 我在我的boot strap项目中使用Jasny Javascript文件上传,它看起来像这样: ASP \ HTML视图 Select fileChangeRemove 我如何在后面的代码中使用它来将附加文件保存到我的服务器,就像我使用C#asp.net文件上传一样? 在ASP.net C#中我通常会在后面的代码中执行此操作: ASP.net C#CodeBehind string filename = FileUpload1.PostedFile.FileName; FileUpload1.PostedFile.SaveAs(Path.Combine(Server.MapPath(“\\Document”), filename).ToString()); filelocation = “Document\\” + filename; media = “Document”; Jasny github解释了如何使用bootstrap设置布局,这很棒,因为它看起来非常好(比无聊的asp文件上传要好得多)但是如何实际让我发布我的按钮点击? 我真的想让这个工作,因为我认为它看起来更好。

如何从VS2012中的简单Nuget安装中解决MVC4 Twitter Bootstrap项目失败?

我在使用Twitter引导程序启动MVC4应用程序时遇到问题。 在VS 2012中,我创建了一个新的空MVC4应用程序,安装了以下软件包: 安装包twitter.bootstrap.mvc4 安装包twitter.bootstrap.mvc4.sample 看起来像一些导航路线选项相关的问题,因为我正在经历这些少数的turorials Link 1和Link 2 。 在阅读有关可能的编译问题的说明时,我重新启动了解决方案,但我收到的错误不是自述文件中的错误,而是集中在NavigationRouteOptions , NavigationRouteFilters , RouteValueDictionary , FilterToken和HasFilterToken : ‘System.Web.Routing.RouteValueDictionary’ does not contain a definition for ‘HasFilterToken’ and no extension method ‘HasFilterToken’ accepting a first argument of type ‘System.Web.Routing.RouteValueDictionary’ could be found (are you missing a using directive or an assembly reference?) …\AdministrationRouteFilter.cs 18 ‘System.Web.Routing.RouteValueDictionary’ does […]

回发c#后保留引导选项卡

我目前在我的fileupload回发后保留引导选项卡时遇到问题。 代码如下 $(‘#myTab a[href=”#image”]’).click(function (e) { e.preventDefault(); $(“#myTab”).removeClass(“active”); $(this).addClass(‘active’); $(this).tab(‘show’); }) $(‘#myTab a[href=”#information”]’).click(function (e) { e.preventDefault(); $(“#myTab”).removeClass(“active”); $(this).addClass(‘active’); $(this).tab(‘show’); }) $(‘#myTab a[href=”#password”]’).click(function (e) { e.preventDefault(); $(“#myTab”).removeClass(“active”); $(this).addClass(‘active’); $(this).tab(‘show’); }) $(‘#myTab a[href=”#account”]’).click(function (e) { e.preventDefault(); $(“#myTab”).removeClass(“active”); $(this).addClass(‘active’); $(this).tab(‘show’); }) 任何人都可以启发我如何在回发后保留这个引导程序?

在bundleconfig中添加bootstrap在asp.net mvc中不起作用

我遇到了一个问题,在我看来很奇怪。 我通过nuget包控制台安装了bootstrap。 之后,在BundleConfig.cs文件中,我向bundles列表中添加了两个项: bundles.Add(new ScriptBundle(“~/bundles/bootstrap”).Include( “~/Scripts/bootstrap.min.js”)); bundles.Add(new StyleBundle(“~/Content/bootstrap”).Include( “~/Content/bootstrap.min.css”, “~/Content/bootstrap-theme.min.css”)); 当然,这些文件存在于本地。 _Layout.cshtml文件包含 @ViewBag.Title @Styles.Render(“~/Content/css”) @Scripts.Render(“~/bundles/modernizr”) @Styles.Render(“~/Content/bootstrap”) @RenderBody() @Scripts.Render(“~/bundles/jquery”) @Scripts.Render(“~/bundles/bootstrap”) @RenderSection(“scripts”, required: false) 但是当我看到一个视图(例如登录页面)时,我看到该bundle没有附加bootstrap部分。 Login …

如何使用Razor通过循环正确生成引导网格?

我使用ASP.NET MVC和bootstrap。 我在集合中有很多对象(> 2),每个需要一个 但是连续只有2个 。 如何使用循环来实现这个目标? 有一种方法,但我正在寻找更好的东西: @model List @using (Html.BeginForm(“ActionName”, “ControllerName”)) { @for (int i = 0; i < Model.Count; i++) { if (i % 2 != 0) { @Html.TextBoxFor(o => o[i].Value) } else { @Html.TextBoxFor(o => o[i].Value) } } }