NewBee Q: Saving TextBox data to Table and display a new page.

Discussion in 'ASP .Net' started by Martin Arvidsson, Visual Systems AB, Mar 18, 2008.

  1. Hi!

    I have a couple of newbee questions.

    I have a .aspx page with a couple of TextBoxes and a submit button.

    Now...

    When i press the submitbutton i want the data in the TextBoxes to be saved
    in my Sql Table.
    Do i have to manually create an insert statement and get the text with the
    Text property from each TextBox
    or is there a way to set a DataSet and then issue a save statement?

    Next question is.
    When i submit the page and the information is stored i want to go to a new
    page
    How can i do that?

    Any links, code samples, points to the right direction would be greatly
    appreciated.

    Regards
    Martin
    Martin Arvidsson, Visual Systems AB, Mar 18, 2008
    #1
    1. Advertising

  2. Martin Arvidsson, Visual Systems AB

    David Wier Guest

    either way, you'll still have to assign the data from the textboxes as the
    source of the data, to be inserted into the database. You might check out
    this code sample:
    http://www.aspnet101.com/aspnet101/aspnet/codesample.aspx?code=showinsert

    though it was created with v1.1 of ASP.Net, it gives you the basics.


    David Wier
    http://aspnet101.com
    http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
    bloated markup


    "Martin Arvidsson, Visual Systems AB" <> wrote in
    message news:%...
    > Hi!
    >
    > I have a couple of newbee questions.
    >
    > I have a .aspx page with a couple of TextBoxes and a submit button.
    >
    > Now...
    >
    > When i press the submitbutton i want the data in the TextBoxes to be saved
    > in my Sql Table.
    > Do i have to manually create an insert statement and get the text with the
    > Text property from each TextBox
    > or is there a way to set a DataSet and then issue a save statement?
    >
    > Next question is.
    > When i submit the page and the information is stored i want to go to a new
    > page
    > How can i do that?
    >
    > Any links, code samples, points to the right direction would be greatly
    > appreciated.
    >
    > Regards
    > Martin
    >
    David Wier, Mar 18, 2008
    #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. Paul Evans

    Saving textbox data as .txt file?

    Paul Evans, Dec 13, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,080
    David Wier
    Dec 13, 2004
  2. Rene
    Replies:
    2
    Views:
    278
  3. Jack
    Replies:
    3
    Views:
    125
  4. Steve
    Replies:
    4
    Views:
    201
    Steve
    Feb 7, 2006
  5. Replies:
    2
    Views:
    439
    Thomas 'PointedEars' Lahn
    Mar 11, 2008
Loading...

Share This Page