<!DOCTYPE html>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<table name="GridView" class="table table-striped">
<thead>
<tr>
<th>Haber Adı</th>
<th>Link</th>
<th>Yayınlanma Sati</th>
</tr>
</thead>
<tbody>
<tr>
<input type="password" class="form-control" id="sifre" runat="server" />
<td id="t_haberadı" runat="server"> </td>
<td id="t_link" runat="server">2</td>
<td id="t_saat" runat="server">3</td>
</tbody>
</table>
</div>
</html>
//代码隐藏
SqlDataAdapter da = new SqlDataAdapter(veriler, bag);
DataSet ds = new DataSet();
//da.Fill(ds);
//GridView1.DataSource = ds;
//GridView1.DataBind();
** boostrap表会员将显示数据库请帮帮我 我该如何显示我的数据? 向我展示我想做的数据增强表
// Bir ya da birdenfazlasatırlarınsonuçoralaraköneceğisorgulardaSqlCommand'ınExecuteReaderözelliğikullanılmaktadır。 ExecuteReader geriye SqlDataReader tipindeveridöndürmektedir.// **
答案 0 :(得分:0)
显示响应表的最佳方法是使用bootstrap。
我建议你做一些像
这样的事情http://www.c-sharpcorner.com/UploadFile/47548d/responsive-grid-view-in-Asp-Net/
答案 1 :(得分:0)
试试此代码
<div class="container">
<div class="row">
<div class="col-lg-12 ">
<div class="table-responsive">
<table name="GridView" class="table table-striped">
<thead>
<tr>
<th>Haber Adı</th>
<th>Link</th>
<th>Yayınlanma Sati</th>
</tr>
</thead>
<tbody>
<tr>
<input type="password" class="form-control" id="sifre" runat="server" />
<td id="t_haberadı" runat="server"> </td>
<td id="t_link" runat="server">2</td>
<td id="t_saat" runat="server">3</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>