Click here to Skip to main content
12,950,099 members (54,365 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Here is my .aspx page
<form id="form1"  runat="server">
    <asp:GridView ID="GV" runat="server"  AutoGenerateColumns="false">
    <asp:TemplateField HeaderText="Name">
    <ItemTemplate >
    <asp:TextBox ID="txtName" runat="server" Text='<%#Eval("Name") %>'></asp:TextBox>
    <asp:BoundField DataField="EmailId" HeaderText="Email" />
    <asp:Button ID="btnSave" runat="server" Text="Save" />

Now i am binding it from code behind on page load as given below
 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Page.IsPostBack Then
            Dim str As String = ConfigurationManager.AppSettings("DBConn")
            Dim Conn As New SqlConnection(str)
            Dim qry As String = "SELECT * FROM dbo.Employee"
            Dim adp As New SqlDataAdapter(qry, Conn)
            Dim ds As New DataSet
            GV.DataSource = ds
        End If
    End Sub

Now I have textbox as a editable field and user will make the changes to those textboxes

and What i want is after click of a save button those changes to be updated in dataset and further in sql Employee table

Without any kind of loop

Please suggest
Posted 12-Nov-12 6:06am
Amol_Joshi 13-Nov-12 0:36am
Anybody with hint

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,749
CHill60 3,380
Maciej Los 2,953
Jochen Arndt 1,935
ppolymorphe 1,820

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 12 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100