Multiple gridviews in ASP.net web application side by side

Satyapriyanayak
Posted by Satyapriyanayak under ASP.NET category on | Points: 40 | Views : 1342
Method-1

<div>
<table>
<tr>
<td><asp:GridView ID="GridView1" runat="server"></asp:GridView></td>
<td><asp:GridView ID="GridView2" runat="server"></asp:GridView></td>
</tr>
</table>
</div>


Method-2

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm7.aspx.cs" Inherits="WebApplication16.WebForm7" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
#leftPanel
{
width:300px;
float:left;
position:relative;
}
#rightPanel
{
width:300px;
float:left;
position:relative;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="leftPanel">
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</div>
<div id="rightPanel">
<asp:GridView ID="GridView2" runat="server">
</asp:GridView>
</div>
</form>
</body>
</html>

Comments or Responses

Login to post response