| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|
#1 (permalink) |
|
Junior Member
Join Date: Nov 2006
Age: 32
Posts: 1
Thanks: 0 Thanked 0 Times in 0 Posts Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 3
|
problem with textbox in ms.net2005(very urgent)
hi,
i have written a program in msvisual studio2005. in that program i take textboxes. i have retrieve the data from database and populate(display) the data in the text boxes. but when i will try to change the data, the text box will not take the new data to update database.what is the problem with textox.is it required any special properties. see coding for this for ex in page load i have written like this i retrieve the data from database and i assign so the textbox is like this textbox1.text="vijay" textbox2.text="india" then i want to change the data vijay as sekhar and india as indian so i type that in textoxes.then i wii come to the update button and wrote the queries to update. but here also the textboxes take the data as vijay and india. so there is no updation i did not under stand that what is the problem. please go through this and give the solution for this. very urgent thanks in advanced |
|
|
|
|
|
#2 (permalink) |
|
Member
Join Date: Aug 2006
Posts: 49
Thanks: 0 Thanked 0 Times in 0 Posts Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 3
|
Re: problem with textbox in ms.net2005(very urgent)
Hi,
Vijay and India are the value assigned to textbox1 and textbox2 and are retrived from database. Close the connection after the page is loaded and the textbox is updated. On click event of Update button, you need to write code to push the data of Textbox1 and textbox2 to database using Update method. To help you in this issue, please tell us which DBA u r using in background. Paste the code for on page load event, on click event of Update button. I might then be able to help you. Thanks Sand |
|
|
|
|
|
#3 (permalink) |
|
Junior Member
Join Date: Aug 2006
Posts: 10
Thanks: 0 Thanked 0 Times in 0 Posts Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 3
|
Re: problem with textbox in ms.net2005(very urgent)
Well the thing happening here is in the page load event u are fetching the data from database. so while u are updating with ur database new values again the page load is occuring.So to avoid this keep all the code in your pageload event in an if condition like this
If(page.IsPostBack==false) { keep all ur page load code here.... } |
|
|
|
|
|
#4 (permalink) |
|
Junior Member
Join Date: Nov 2006
Age: 25
Posts: 1
Thanks: 0 Thanked 0 Times in 0 Posts Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 3
|
Re: problem with textbox in ms.net2005(very urgent)
hi bandiprasad,
Just get the text box value from page_preload event instead of getting from page_load event bcoz i faced the same problem what u faced. its enough to get and update ur data bye |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Urgent Opening in Mumbai(Java/J2EE/Struts) Experience 2 - 7 years | sridhar | EXPERIENCED JOBS | 0 | 14-11-06 02:58 PM |
| URGENT NEED: SAP MM/PP Support Specialist | sridhar | EXPERIENCED JOBS | 0 | 07-11-06 06:27 PM |
| Urgent opening for AS400 professionals in a leading MNC(Chennai/Pune) | sridhar | EXPERIENCED JOBS | 0 | 06-11-06 10:16 PM |
| Simple solution to a complex problem | AjayKumar.Kataram | Inspire yourself & Others - Leaders Zone | 3 | 10-10-06 12:30 PM |
| System Problem | au123 | NETWORK ADMINISTRATION , HARDWARE & TROUBLESHOOTING | 4 | 09-10-06 10:59 PM |