Solved

Values assignin to text boxes through coding not saving in database

Posted on 2004-10-18
4
167 Views
Last Modified: 2010-04-23
Sir,

I am using VB.net.  Through coding I bound textboxes and datagrid to dataset columns.  I am not using controls for dataadapter, dataset and connection.  through coding I am assignin some values to some text boxes.  and in some text boxes user will input the values.  During the save, I found values which assigned to text boxes through coding is not saved in database.  After assgining values to text boxes if I am clicking that text boxes values are saved in databse.  Why it is happening like this ? what is solution for this problems??

Please Help

Thanks
0
Comment
Question by:adwat
4 Comments
 
LVL 18

Accepted Solution

by:
tusharashah earned 250 total points
ID: 12337841
Make sure you assign your Value while IsPagePostBack is false....

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

Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
 If Not IsPostBack Then
     ' Fill your textbox here...
 End If
End Sub

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

Otherwise the values will be replaced by the time you hit Submit/Save.

-tushar
0
 
LVL 8

Assisted Solution

by:wguerram
wguerram earned 250 total points
ID: 12338367
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now