Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
14 views1 page

Gridview With All Styles

The document is an ASP.NET web page that includes a GridView control for displaying data from a SQL database. It defines columns for 'rno', 'm1', and 'm2', and is connected to a SqlDataSource for data retrieval and manipulation. The GridView is styled with various properties for appearance and functionality.

Uploaded by

godsonsoban0342
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

Gridview With All Styles

The document is an ASP.NET web page that includes a GridView control for displaying data from a SQL database. It defines columns for 'rno', 'm1', and 'm2', and is connected to a SqlDataSource for data retrieval and manipulation. The GridView is styled with various properties for appearance and functionality.

Uploaded by

godsonsoban0342
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="home.aspx.

cs" Inherits="home" %>

<body>

<form id="form1" runat="server">

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"


BackColor="MistyRose" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
CellPadding="3"
DataKeyNames="rno" DataSourceID="SqlDataSource1" ForeColor="Blue">
<RowStyle ForeColor="#000066" />
<Columns>
<asp:BoundField DataField="rno" HeaderText="rno" ReadOnly="True" SortExpression="rno" />
<asp:BoundField DataField="m1" HeaderText="m1" SortExpression="m1" />
<asp:BoundField DataField="m2" HeaderText="m2" SortExpression="m2" />
</Columns>
<FooterStyle BackColor="White" ForeColor="#000066" />
<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#00C0C0" BorderColor="#00C000" BorderStyle="Double"
Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<asp:SqlDataSource

ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:con %>"
OnSelecting="SqlDataSource1_Selecting"
ProviderName="<%$ ConnectionStrings:con.ProviderName %>"
SelectCommand="SELECT [rno], [m1], [m2] FROM [secondmca]"
DeleteCommand="DELETE FROM secondmca"
UpdateCommand=" " >

</asp:SqlDataSource>
</form>

</body>

</html>

You might also like