Solved

Values assignin to text boxes through coding not saving in database

Posted on 2004-10-18
4
155 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
Comment Utility
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
Comment Utility
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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 …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

16 Experts available now in Live!

Get 1:1 Help Now