Simple Web Form

Discussion in 'ASP .Net' started by John Rivers, Oct 25, 2006.

  1. John Rivers

    John Rivers Guest

    Hi

    I am new to ASP.NET and I am trying to create a very simple form

    with one TextBox and one Button

    which will update one record

    The TextBox is data bound to: "select top 1 value from table"

    I am using SqlDataAdapter.Fill(DataSet) and TextBox.DataBind()

    I have setup the SqlDataAdapter UpdateCommand

    what do I do next?

    John
    John Rivers, Oct 25, 2006
    #1
    1. Advertising

  2. Have your code update the changed value from the databound TextBox into the
    corresponding DataRow of your datasource, and pass it into the
    SqlDataAdapter's Update method.
    Peter

    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "John Rivers" wrote:

    > Hi
    >
    > I am new to ASP.NET and I am trying to create a very simple form
    >
    > with one TextBox and one Button
    >
    > which will update one record
    >
    > The TextBox is data bound to: "select top 1 value from table"
    >
    > I am using SqlDataAdapter.Fill(DataSet) and TextBox.DataBind()
    >
    > I have setup the SqlDataAdapter UpdateCommand
    >
    > what do I do next?
    >
    > John
    >
    >
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Oct 25, 2006
    #2
    1. Advertising

  3. textbox do not support 2-way databinding. they must be in a control that
    does, say the DetailView or FormView classes.

    -- bruce (sqlwork.com)

    "John Rivers" <> wrote in message
    news:...
    > Hi
    >
    > I am new to ASP.NET and I am trying to create a very simple form
    >
    > with one TextBox and one Button
    >
    > which will update one record
    >
    > The TextBox is data bound to: "select top 1 value from table"
    >
    > I am using SqlDataAdapter.Fill(DataSet) and TextBox.DataBind()
    >
    > I have setup the SqlDataAdapter UpdateCommand
    >
    > what do I do next?
    >
    > John
    >
    bruce barker \(sqlwork.com\), Oct 25, 2006
    #3
    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. Keith
    Replies:
    4
    Views:
    741
    DalePres
    May 2, 2004
  2. Li Zhang
    Replies:
    4
    Views:
    6,062
    softip
    Feb 27, 2009
  3. Replies:
    5
    Views:
    775
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Jun 12, 2007
  4. Rob R. Ainscough
    Replies:
    3
    Views:
    322
    Rob R. Ainscough
    Jun 14, 2005
  5. rob c
    Replies:
    4
    Views:
    319
    McKirahan
    Dec 30, 2005
Loading...

Share This Page