Results 1 to 2 of 2

Thread: Context.Items.Add question

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    51

    Question Context.Items.Add question

    Hi!

    At first I tell you what I will do:

    1. Load data from DB
    2. Fill System.Web.UI.WebControls.TextBox with data from DB
    3. Than the user can change some data in the System.Web.UI.WebControls.TextBox

    and now how I can compare what the user change?

    should I add a new Item to Context.Items and compare it after changes?

    any idea?


    regards,


    gicio

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Context.Items maintains an internal list of object for the current HTTPRequest. If you need to know the value of the textbox before the user made his or her changes, try stuffing the value into the pages viewstate. For example:

    Code:
    // After you populate your textbox, dump the data into viewstate
    ViewState["MyData"] = MyTextBox.Text;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width