TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nethra R S
NA
310
334.7k
Saving gridview data in sql table
Nov 21 2011 11:15 PM
Hi,
I have a gridview with blank rows and i can add rows to the gridview at button clickevent. How do i save the data entered in this gridview to the sql table? here is the source for the gridview:I am dynamically creating rows in the gridview
<asp:GridView ID="GVContactPerson" runat="server" AutoGenerateColumns="False"
CssClass="GridViewStyle" ShowFooter="True" UseAccessibleHeader="False"
Width="500px">
<Columns>
<asp:BoundField DataField="SlNo" HeaderText="SL No" />
<asp:TemplateField HeaderText="Contact Name">
<ItemTemplate>
<asp:TextBox ID="txtContactName" runat="server" CssClass="GridItemStyle"
Width="90px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="EmailID">
<ItemTemplate>
<asp:TextBox ID="txtemail" runat="server" CssClass="GridItemStyle" Width="90px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Mobile">
<ItemTemplate>
<asp:TextBox ID="txtmob1" runat="server" CssClass="GridItemStyle" Width="90px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Status">
<ItemTemplate>
<asp:CheckBox ID="ChkStatus" runat="server" AutoPostBack="false" Checked="true"
CssClass="GridItemStyle" />
</ItemTemplate>
<FooterStyle HorizontalAlign="Right" />
<FooterTemplate>
<asp:ImageButton ID="imgadd" runat="server" Height="20px" ImageAlign="Right"
ImageUrl="~/ImagesFiles/add_button.png" OnClick="imgadd_click"
ToolTip="add another contact" Width="20px" />
</FooterTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle BackColor="White" BorderColor="#666666" BorderStyle="Solid"
BorderWidth="2px" Font-Bold="True" ForeColor="#666666" Height="15px" />
</asp:GridView>
Reply
Answers (
1
)
Tab Index Highlight on focus
Can i add two or three ajaxcontroltoolkit tool into toolbox??