Database Create
Student : roll , name , city , cost
Fix 6 Value in Database Record
====================================================================
Default.aspx Page
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="WebApplication1._default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
OnRowDataBound = "OnRowDataBound" ShowFooter="True">
<Columns>
<asp:BoundField DataField="roll" HeaderText="Roll" ItemStyle-Width = "100">
<ItemStyle Width="100px"></ItemStyle>
</asp:BoundField>
<asp:BoundField DataField="name" HeaderText="Name" ItemStyle-Width = "100">
<ItemStyle Width="100px"></ItemStyle>
</asp:BoundField>
<asp:BoundField DataField="city" HeaderText="Name" ItemStyle-Width = "100">
<ItemStyle Width="100px"></ItemStyle>
</asp:BoundField>
<asp:TemplateField HeaderText="City">
<ItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("cost") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</form>
</body>
</html>
No comments:
Post a Comment