Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textboxs

Status
Not open for further replies.

KevoMee

Technical User
Apr 30, 2002
72
IE
Hi, I've created my textbox and when the page loads I put a value into so it will show some text when the pages loads.

1. FirstNameBox.Text = UserRow.firstname;

Now if the text in that box is changed and the person clicks on the submit button then I want the data to be changed in the database so this is what I do:

2. AuctionSet.users.FindByusername(Context.User.Identity.Name)["firstname"] = FirstNameBox.Text;

Now, I've debugged this and the text in the box is the same as in step 1 even if I change the text and press submit!

Anyone got any ideas on this one?

Thanks,
kev.
 
Check if you are putting the data in place on your page load event. If you are each time the page loads you will get that data set up. On a lot of my pages I load my data from inside a

If (!Page.IsPostBack)
{
loadData();
}

type of thing. Because if your UserRow.firstname is not being changed then you will still get the same value as the initial if you are setting the textbox on the page load each time.

HTH Crystal
crystalized_s@yahoo.com

--------------------------------------------------

Experience is one thing you can't get for nothing.

-Oscar Wilde

 
Thanks alot, I was just about to go postal on that one:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top