How to retrieve data from DetailsView Edit??

Discussion in 'Software' started by sakhu, Jul 3, 2007.

  1. sakhu

    sakhu

    Joined:
    Jul 3, 2007
    Messages:
    2
    Hi all

    I have following code to display data in DetailsView, but now for editing the dataset from DetailsView I need to read data fromt eh textbox of DetailsView, how can i do that??

    <asp:templatefield headertext="Module Weight" >
    <itemtemplate>
    <asp:label id="FirstNameLabel"
    Text= '<%# Eval("au_fname") %>'
    runat="server"/>
    </itemtemplate>
    <Edititemtemplate>
    <asp:TextBox id="LastNameLabel"
    Text= '<%# DataBinder.Eval(Container.DataItem,"Model_Wt_kg") %>'
    runat="server"/>
    </Edititemtemplate>
    </asp:templatefield>

    In C# code behind to display data in these fields the code which is working fine:
    dbcon.Open();
    adp = new OleDbDataAdapter(sqlStmt,dbcon);
    adp.Fill(ds, "Product");
    closeConnection();
    table1 = ds.Tables["Product"];
     
    sakhu, Jul 3, 2007
    #1
    1. Advertising

  2. sakhu

    sakhu

    Joined:
    Jul 3, 2007
    Messages:
    2
    hi

    I can now read the data from text box, but those data which are displayed from database, nto the data enteretd by user. What shall i do to read the data entered by user in detailsview.
     
    sakhu, Jul 5, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. azeem
    Replies:
    0
    Views:
    2,589
    azeem
    Oct 22, 2006
  2. Alan Browne

    Snapshot restraint - edit, edit, edit

    Alan Browne, May 5, 2005, in forum: Digital Photography
    Replies:
    24
    Views:
    1,197
    Mr. Mark
    May 10, 2005
  3. Patrick

    Snapshot restraint - edit, edit, edit

    Patrick, May 6, 2005, in forum: Digital Photography
    Replies:
    0
    Views:
    567
    Patrick
    May 6, 2005
  4. Matt Silberstein

    Snapshot restraint - edit, edit, ed

    Matt Silberstein, May 6, 2005, in forum: Digital Photography
    Replies:
    0
    Views:
    450
    Matt Silberstein
    May 6, 2005
  5. Ben Rosengart

    Snapshot restraint - edit, edit, ed

    Ben Rosengart, May 6, 2005, in forum: Digital Photography
    Replies:
    0
    Views:
    358
    Ben Rosengart
    May 6, 2005
Loading...

Share This Page