?
Solved

Updating text boxes

Posted on 2006-06-06
3
Medium Priority
?
240 Views
Last Modified: 2010-04-23
I am working on a web-based ticket application.  I have a view where a user can see help tickets he or she created.  They can click on the ticket, and a new page loads with the text of the ticket so that they can edit the information.  I have an update button that executes an update SQL statement to update the ticket information.  The update query works just fine.  The query takes an input parameter '@Description'.  This parameter is bound to the text box, 'txtDescription.text'.  However, when the update button is selected, and the parameters are being set, the 'txtDescription.text' value is set to the old value, not the actual values that are in the text box.  Does that make sense??? How do I fix it!?  Thanks.
0
Comment
Question by:christopher_perry
3 Comments
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 2000 total points
ID: 16849297
>> and a new page loads with the text of the ticket so that they can edit the information
I think what would have been happening is that the text you are assigning to the TextBox when it loads for the first time would be again set to the text box even after the user modifies it and says Update.

Check your Page_Load code, how have you set the text box text for the first time ?
use IsPostBack

If Not IsPostBack Then
   TextBox1.Text="First Time Page is Shown" 'i.e the code to set textxbox value for firts time should be within this IF block
End if

0
 
LVL 6

Expert Comment

by:manch
ID: 16849299
Use the AcceptChanges() Method of the DataSet /Adapter
(the changes will be reflected)

DataSet.AcceptChanges()
0
 

Author Comment

by:christopher_perry
ID: 16855862
Arif- you're right, I had the text boxes populating during Page_Load.  Thanks for the help!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question