473,395 Members | 1,442 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,395 software developers and data experts.

Automatically saving and restoring a form/ webform

Hi, I was wondering if anyone had any ideas / opinions on what the
best way would be to automatically save to and re-populate a form from
a business object would be.

I usually find myself spending a ton of time hooking up my GUI to my
business objects to save the object to the database and then the same
amount of time in reverse repopulating the GUI from the business
object.

e.g. Say I have a person object

public struct person
{
string firstName;
string lastName;
}

and I want to assign values from a form (where txtFirstName and
txtLastName are textboxes)

person employee = new person();
employee.firstName = txtFirstName.Text;
employee.lastName = txtLastName.Text;

Then repeat the above for multiple forms and then in reverse to re-
populate the form.... boring cookie cutting code..

There must be a better way to do this, has anyone got any better
suggestions/ commercial products/ free products?

Thanks
Catherine

Oct 30 '07 #1
2 1149
My nntp client (on a small screen) only displayed up to "a form/", so
I missed the "webform" part... the prveious post relates primarily to
WinForm code; WebForm binding works very differently, but does exist.
I'm not really much of an expert in that area, so perhaps search for
"asp.net" and "data binding"...

Marc
Oct 30 '07 #2
On Oct 30, 6:27 pm, "Marc Gravell" <marc.grav...@gmail.comwrote:
My nntp client (on a small screen) only displayed up to "a form/", so
I missed the "webform" part... the prveious post relates primarily to
WinForm code; WebForm binding works very differently, but does exist.
I'm not really much of an expert in that area, so perhaps search for
"asp.net" and "data binding"...

Marc

Thanks Marc

Oct 30 '07 #3

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

Similar topics

4
by: Jacob H | last post by:
Hello list... I'm developing an adventure game in Python (which of course is lots of fun). One of the features is the ability to save games and restore the saves later. I'm using the pickle...
3
by: Christopher Koh | last post by:
how do you stop Access from saving any changed data in your tables and queries? like i just add or change data on the table/query tables,then click on X (exit)because i have no intention of saving...
6
by: cpnet | last post by:
I've authored a custom web component (a non-ui component kinda like a DataSet) and so far it's working. When my web component is added to the web form in the designer from the toolbox, the...
30
by: VB Programmer | last post by:
Briefly, how do you save the current form to a jpeg or gif? Details: I have a form with a speedometer control on it. It continually loops through a table in a db that has different current...
1
by: Tom | last post by:
I have a large application; lots of forms, multiple dynamic DLLs, etc. I also have, in the appliation, a general 'Preferences' class object (which is in itself a separate DLL, and I just include a...
3
by: Mike | last post by:
I don't think this is possible, but wanted to check anyways. I have the following line of code in the Page_Load() event of every webform within as asp.net project... Dim GiftPurchase As...
1
by: Sridhar | last post by:
Hi, I have a form where I have several text boxes. I am filling all those values and when I click on submit I am redirecting to new webform using Response.Redirect(). In the new webform if I...
15
by: Marcus Kwok | last post by:
How do you save the formatting options for a stream? In the program below, notice that when I define my operator<<() for the custom type, it permanently changes the output format of the stream: ...
12
by: JHNielson | last post by:
This is king of urgent. I am in the middle of system testing and having problems. I have a form where users can update a Mater List of Values. I have a Save, Delete, Add-New, and Forward and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.