1
Answer

Saving gridview data in sql table

Nethra R S

Nethra R S

13y
2.7k
1
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>

Answers (1)
4
Anil Kumar
NA 11.8k 983k 11y

You need to polish yourself to get a software developer/engineer job if not got placed in campus. There are many vacancies but companies wants ready-made hands. So, be tuned on latest trends with good understanding on basics.

A report says, there would around 1.5 Lac vacancies in this year. Last year they calculated it around 1.8 Lac. Don't worry, this figure is based on some parameter but actual employment was more than this as there are many startups and small firms has some take-on. 

Best of Luck!
0
Nandhini Jayachandran
NA 117 31.5k 11y
can u please say latest trend of .net ...i am also fresher 2013 batch searching for job
0
Ravi Shekhar
NA 5.4k 970.7k 11y


Good suggestion sir...
0
aksahy nangare
NA 5 1.8k 11y
thanku sir...........


0
aksahy nangare
NA 5 1.8k 11y
I m FRESHER recently i completed MY BE COMPUTER DEGREE 
I M FROM =2013 BATCH...



0
Muralidharan Deenathayalan
NA 11.9k 1.5m 11y
Yes. Are you fresher or experienced candidate?