添加功能已经写好了但是只是数据库添加页面并没有显示,怎么让数据库重新获取到而且显示新添加后的列表

不可能改名的 2019-05-13 03:27:27
@page
@{
ViewBag.Title = "应急预案";
}
<form>
<label>
<input type="text" name="name" placeholder="搜索应急知识名称" />
<button type="button" id="btnsearch">搜索</button>
<button type="button" id="btnAdd">添加</button>
</label>
</form>
<table border="1" id="targetTable">
<tr border="1px" data-html="true">
<td>序号</td>
<td>应急预案名称</td>
<td>发布时间</td>
<td>详情</td>
</tr>
<tr>
<td>1</td>
<td>管网主管道爆管</td>
<td>2019.1.1</td>
<td><a href="/plan/index" class="rain-btn rain-btn-primary ">查看 修改 删除</a></td>
</tr>
</table>
@section Scripts{

<script type="text/javascript">

$(function () {

$("#btnAdd").click(function () {
window.location.href = '/plan/add';
})
$("#btnsearch").click(function () {
window.location.herf = '/plan/search';
})
$("#targetTable").click(function () {
window.location.herf = '/plan/delete';
})
$("#btnsubmit").click(function () {
window.location.herf = '/plan/Edit';
})
</script>
}
...全文
294 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
不可能改名的 2019-05-16
  • 打赏
  • 举报
回复
能给具体代码展示吗
OrdinaryCoder 2019-05-13
  • 打赏
  • 举报
回复
1.添加到数据库的时候手动添加到界面上
2.添加到数据库后通过数据库更新界面

110,535

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧