1.Open visual studio and create a new website.
2.Drag some text boxes , labels , button and Add a data grid view on the page.
3.Use the code on Default.aspx page.
<asp:Label
ID="Label1"
runat="server"
Width="60px"
Text="Name"></asp:Label>
<asp:TextBox
ID="TextBox1"
CellPadding="4"
CellSpacing="2"
runat="server"
AutoCompleteType="Disabled"></asp:TextBox>
<br
/>
<br
/>
<asp:Label
ID="Label2"
runat="server"
Width="60px"
Text="Address"></asp:Label>
<asp:TextBox
ID="TextBox2"
CellPadding="4"
CellSpacing="2"
runat="server"
AutoCompleteType="Disabled"></asp:TextBox>
<br
/>
<br
/>
<asp:Label
ID="Label3"
runat="server"
Width="60px"
Text="Age"></asp:Label>
<asp:TextBox
ID="TextBox3"
CellPadding="4"
CellSpacing="2"
runat="server"
AutoCompleteType="Disabled"></asp:TextBox>
<br
/>
<br
/>
<asp:Label
ID="Label4"
runat="server"
Width="60px"
Text="Phone_no"></asp:Label>
<asp:TextBox
ID="TextBox4"
CellPadding="4"
CellSpacing="2"
runat="server"
AutoCompleteType="Disabled"
</asp:TextBox>
<br
/>
<br
/>
<asp:Button
ID="Button1"
runat="server"
CellPadding="4"
CellSpacing="2"
onclick="Button1_Click"
Text="Insert"
style="height:
26px" />
<asp:Button
ID="Button2"
runat="server"
onclick="Button2_Click"
Text="Delete"
/>
<br
/>
<br
/>
<br
/>
<asp:GridView
ID="GridView1"
runat="server"
BackColor="#CCCCCC"
BorderColor="#999999"
BorderStyle="Solid"
BorderWidth="3px"
CellPadding="4"
CellSpacing="2"
ForeColor="Black">
<RowStyle
BackColor="White"
/>
<FooterStyle
BackColor="#CCCCCC"
/>
<PagerStyle
BackColor="#CCCCCC"
ForeColor="Black"
HorizontalAlign="Left"
/>
<SelectedRowStyle
BackColor="#000099"
Font-Bold="True"
ForeColor="White"
/>
<HeaderStyle
BackColor="Black"
Font-Bold="True"
ForeColor="White"
/>
</asp:GridView>
<asp:SqlDataSource
ID="SqlDataSource1"
runat="server"></asp:SqlDataSource>

Dennis KoenigPosted May 20, 2011, 3:40 PM
The Download File ist offline :-(