473,320 Members | 1,993 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

textboxes retaining original value

JC
Hi,

I am a novice at .net and have created a page of text boxes that are
populated from a database. I want the user to be able to change the
values in the box then submit the page and have these value updated to
the databse. However, whenever I post the page it is the old values
that are posted, not the newly entered ones.

I am totally confused - this was SUCH an easy thign to accomplish
using traditional ASP. Your help woudl be appreciated

Yours

JC
Nov 15 '05 #1
2 1677
You are probably overwriting your values with those from the database.
Wherever you initially set the Textboxes you need to put that code inside a
block that checks for postback. That way only the first time you hit the
page (not a post back), will the values be placed into the Textboxes.

if (!IsPostBack) {
// Do db call here and set up textboxes.
}
--
Justin Rogers
DigiTec Web Consultants, LLC.

"JC" <ja*********@btinternet.com> wrote in message
news:d7**************************@posting.google.c om...
Hi,

I am a novice at .net and have created a page of text boxes that are
populated from a database. I want the user to be able to change the
values in the box then submit the page and have these value updated to
the databse. However, whenever I post the page it is the old values
that are posted, not the newly entered ones.

I am totally confused - this was SUCH an easy thign to accomplish
using traditional ASP. Your help woudl be appreciated

Yours

JC

Nov 15 '05 #2
....a little code should help the list answer this...
I suggest that you repost this message into the "aspnet" group and provide
some of your source code..before that check that your ASP.NET controls are
inside a form like this..

<form id="Form1" method="post" runat="server">
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox>
....
....
</form>

/Oscar

"JC" <ja*********@btinternet.com> wrote in message
news:d7**************************@posting.google.c om...
Hi,

I am a novice at .net and have created a page of text boxes that are
populated from a database. I want the user to be able to change the
values in the box then submit the page and have these value updated to
the databse. However, whenever I post the page it is the old values
that are posted, not the newly entered ones.

I am totally confused - this was SUCH an easy thign to accomplish
using traditional ASP. Your help woudl be appreciated

Yours

JC

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Suresh Kumaran | last post by:
How do you retain the last value the user keyed in a text box? I should be able to show the values when the user runs the executable for the second time. Appreciate help. Suresh
7
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
19
by: jeff | last post by:
how do you convert form byte to Int32 while retaining the binary value of the byte array
3
by: samneefs | last post by:
I'm wondering if there's a way to create an array of textboxes, or loop through textboxes. The textboxes are in an ASP.NET page, but the looping happens through Visual Basic. On page load,...
0
by: Thomas Homan | last post by:
Hello, Is there a method in the FtpWebRequest that allows for preservation of the file being transferred original date and time in vs2005 vb? In the FTPSample the method is to set up stream...
4
by: kjworm | last post by:
Hello everyone. I have a parameter query that I would like to retain the parameter value for future use. What I would like to do is have the user perform the query, select the distinct result that...
3
by: sakhan | last post by:
Hello Friends, I want to create a row of 10 textboxes each time I click the add button. I want this to continue till it reaches five hundred I am using AJAX for this. It doesnot create 10...
1
by: parims | last post by:
Hello guys.. At present im creating dynamic page which includes add/modify/deleted rows in the page. While adding textboxes, im getting addbutton value for inserting newly entered into db. But...
1
by: Anjana Bhat | last post by:
Hi, im using asp.net with c#.In my form i have a list of html radio button group in which if i select one,a text box and an image is loaded .This i have done thro. javascript.but in the same page...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.