i will use flash player and my data is
DESIGN CODE
<%--Design code--%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.style1
{
width: 100%;
}
.style2
{
width: 283px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<br />
<br />
<br />
<table class="style1">
<tr>
<td class="style2">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
AutoGenerateSelectButton="True"
AllowPaging="True"
AllowSorting="True"
DataKeyNames="eid"
onpageindexchanging="GridView1_PageIndexChanging"
onselectedindexchanged="GridView1_SelectedIndexChanged"
onsorting="GridView1_Sorting" PageSize="20">
<Columns>
<asp:BoundField HeaderText="Moviename" DataField="eid" />
</Columns>
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#7C6F57" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</td>
<td>
<asp:DetailsView ID="DetailsView1" runat="server" Height="50px" HeaderText="Movies"
AllowPaging="True"
onpageindexchanging="DetailsView1_PageIndexChanging" Width="125px" CellPadding="3"
GridLines="Vertical" BackColor="White" BorderColor="#999999"
BorderStyle="None" BorderWidth="1px" EnableModelValidation="True">
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="#DCDCDC" />
<EditRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
</asp:DetailsView>
</td>
</tr>
<tr>
<td class="style2">
</td>
<td>
</td>
</tr>
</table>
<br />
<br />
<br />
</div>
</form>
</body>
</html>
C# code:
//C# code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Data.Sql;
using System.Data;
public partial class GridDetailsView : System.Web.UI.Page
{
SqlConnection con;
SqlCommand cmd;
SqlDataAdapter sda;
DataTable dt;
//string ConString, CmdString, TitleID;
string ConString, CmdString, id,eid;
private void BindGridView()
{
con = new SqlConnection("data source=.;database=chandu;integrated security=true");
//CmdString = "SELECT eid FROM Titles";//titles is the table name
CmdString = "SELECT eid FROM adio_3";
cmd = new SqlCommand(CmdString, con);
sda = new SqlDataAdapter(cmd);
dt = new DataTable();
sda.Fill(dt);
GridView1.DataSource = dt.DefaultView;
GridView1.DataBind();
}
protected void Page_Load(object sender, EventArgs e)
{
//ConString = C .ConnectionStrings["ConString"].ConnectionString;
if (!IsPostBack)
{
BindGridView();
}
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
eid = GridView1.SelectedValue.ToString();
BindDetailsView(eid);
}
private void BindDetailsView(string eid)
{
//CmdString = "SELECT a.au_fname AS 'First Name', a.au_lname AS 'Last Name', a.Phone AS 'Phone', a.Address AS 'Address', a.city AS 'City', a.state AS 'State', a.Zip AS 'Zip' FROM authors a JOIN titleauthor t ON a.au_id=t.au_id WHERE t.title_id=@TitleID";
CmdString = "SELECT eid AS 'eid', song1 AS 'song1', song2 AS 'song2', song3 AS 'song3' FROM adio_3 WHERE eid=@eid";
con = new SqlConnection("data source=.;database=chandu;integrated security=true");
cmd = new SqlCommand(CmdString, con);
//cmd.Parameters.AddWithValue("@TitleID", TitleID);
cmd.Parameters.AddWithValue("@eid", eid);
sda = new SqlDataAdapter(cmd);
dt = new DataTable();
sda.Fill(dt);
DetailsView1.DataSource = dt.DefaultView;
DetailsView1.DataBind();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
BindGridView();
}
protected void DetailsView1_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
{
DetailsView1.PageIndex = e.NewPageIndex;
eid = GridView1.SelectedValue.ToString();
BindDetailsView(eid);
}
protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
{
e.SortDirection = SortDirection.Descending;
}
}