我几天前就已经开始工作了,现在我正在靠墙试图弄清楚为什么他们不再打开了。我相信代码很干净,但我显然错过了一些东西。
感谢任何帮助。这是我正在使用的代码。
<!-- Latest compiled and minified CSS -->
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Ubuntu+Condensed' type='text/css' />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous" />
<link rel="stylesheet" href="Content/themes/Site.css" />
</head>
<body>
<div class="navbar">
<div class="row">
<h1 class="col-lg-8 col-lg-offset-2 text-center " style="align-content:center;">Matter Index </h1>
</div>
</div>
<div class="container-fluid">
<form id="form1" runat="server">
<asp:ScriptManager runat="server" ID="scriptmanager1" />
<!-- Move Client Modal -->
<div id="moveModal" class="modal fade" role="dialog" runat="server" >
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Move Matter</h4>
</div>
<div class="modal-body">
<div class="form-group">
<asp:RequiredFieldValidator ID="fvclient" runat="server" ErrorMessage="You must select a new client." CssClass="alert-danger col-md-12" ControlToValidate="ddMove" Display="Dynamic" ValidationGroup="vgMove" />
<label for="ddMove">New Client:</label> <asp:DropDownList ID="ddMove" runat="server" CssClass="form-control" AppendDataBoundItems="true" />
</div>
</div>
<div class="modal-footer">
<asp:Button ID="btnMove" runat="server" Text="Submit" CssClass="btn btn-info btn-sm col-md-1" OnClick="btnMove_Click" CausesValidation="true" ValidationGroup="vgMove"/>
</div>
</div>
</div>
</div>
<!-- Delete Client Modal -->
<div id="delModal" class="modal fade" role="dialog" runat="server" >
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Delete Matter</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label for="delAlert">Are you sure you want to delete this matter? This action is not reversible.</label>
</div>
</div>
<div class="modal-footer" >
<asp:Button ID="btnDelete" runat="server" Text="Submit" CssClass="btn btn-info btn-sm col-md-1" OnClick="btnDelete_Click" />
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-10 col-lg-offset-1 form-group">
<asp:FormView ID="fvdoc" runat="server" DataSourceID="gvdb" OnItemUpdated="fvdoc_ItemUpdated">
<EditRowStyle BackColor="#ccffff" Wrap="false" />
<ItemTemplate>
<h2 class="col-md-12"><asp:Label runat="server" Text=<%# Bind("docid") %> id="a"/> - <asp:Label runat="server" Text=<%# Bind("sName") %> id="b"/></h2>
<div class="left col-md-10">
<legend>Matter Info:</legend>
<div class="form-group">
<asp:Label runat="server" Text="Matter" />
<asp:Label runat="server" CssClass="form-control" Text=<%# Bind("sDocname") %> id="idocname"/>
</div>
</div>
<div class="left col-md-10">
<hr />
<div class="form-group">
<asp:Label runat="server" Text="Notes/Comments" />
<asp:Label runat="server" CssClass="form-control" Text=<%# Bind("sdocdesc") %> id="c"/>
</div>
</div>
<div class="left col-md-6 col-md-offset-5 txsmall">
<asp:Label runat="server" Text="Filed: " Font-Bold="true" /><asp:Label ID="d" runat="server" Text=<%# Bind("dtFiledate") %> CssClass="txsmall" Font-Italic="true" />
<asp:Label runat="server" Text="Modified: " Font-Bold="true" /><asp:Label ID="e" runat="server" Text=<%# DataBinder.Eval(Container.DataItem, "dtLastModified") + " - " + DataBinder.Eval (Container.DataItem,"susermodified") %> CssClass="txsmall" Font-Italic="true"/>
</div>
<div class="clear-fix col-md-12">
<div class="form-group">
<asp:LinkButton runat="server" Text="Edit" ID="EditButton" CommandName="Edit" CssClass="clear-fix btn btn-info" />
<asp:LinkButton runat="server" Text="Move" ID="MoveButton" CssClass="clear-fix btn btn-info" data-toggle="modal" data-target="#moveModal" />
<asp:LinkButton runat="server" Text="Delete" ID="DelButton" CssClass="clear-fix btn btn-info" data-toggle="modal" data-target="#delModal" />
<asp:LinkButton runat="server" Text="Home" ID="HomeButton" CssClass="clear-fix btn btn-info" CausesValidation="False" href="default.aspx"/>
</div>
</div>
</ItemTemplate>
<EditItemTemplate>
<h2 class="col-md-12"><asp:Label ID="lbldocid" runat="server" Text=<%# Bind("docid") %> /> - <asp:Label ID="lblclient" runat="server" Text=<%# Bind("sName") %> /></h2>
<div class="left col-md-10">
<legend>Matter Info:</legend>
<div class="form-group"><asp:Label ID="Label1" runat="server" Text="Matter" AssociatedControlID="dcname"/>
<asp:TextBox ID="dcname" runat="server" CssClass="form-control" Text=<%# Bind("sDocname") %> /></div>
</div>
<div class="left col-md-10">
<hr />
<div class="form-group">
<asp:Label ID="Label2" runat="server" Text="Notes/Comments" AssociatedControlID="dcnotes" /><br />
<asp:TextBox ID="dcnotes" runat="server" Rows="3" TextMode="MultiLine" Wrap="true" Text=<%# Bind("sdocdesc") %> />
</div>
</div>
<!--
<div class="left col-md-6 col-md-offset-5 txsmall">
<asp:Label ID="Label3" runat="server" Text="Filed: " Font-Bold="true" /><asp:Label ID="lblfiledate" runat="server" Text=<%# Bind("dtFiledate") %> CssClass="txsmall" Font-Italic="true" />
<asp:Label ID="Label4" runat="server" Text="Modified: " Font-Bold="true" /><asp:Label ID="lblmodify" runat="server" Text=<%# Bind("dtLastModified") + " - " + Bind("susermodified") %> CssClass="txsmall" Font-Italic="true"/>
</div> -->
<div class="clear-fix col-md-12">
<div class="form-group">
<asp:LinkButton runat="server" Text="Save" ID="SaveButton" CommandName="Update" CssClass="clear-fix btn btn-info" Enabled="true" />
<asp:LinkButton runat="server" Text="Cancel" ID="btnCancel" CommandName="Cancel" CssClass="clear-fix btn btn-info" />
</div>
</div>
</EditItemTemplate>
</asp:FormView>
</div>
</div>
<hr class="col-lg-10 col-lg-offset-1" />
</div>
<...datasource ...>
</form>
<!-- Latest compiled JavaScript -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"/>
</body>
</html>
答案 0 :(得分:0)
我发现了这个问题。问题是将.js
文件放在正文末尾。它显然不再那样了。我将它们移回<head>
并完全关闭</script>
而不是自我关闭/>
。一旦我这样做,它开始工作得很好。