How do you retain the last value the user keyed in a text
box? I should be able to show the values when the user
runs the executable for the second time.
Appreciate help.
Suresh 5 2797
Suresh,
See, there is no single "best" option. I could just give some examples on
which way fits best the nature of the application:
a) An "Options" dialog box of a desktop application. Usually settings are
stored in the registry or in a configuration file. Please refer to the
Microsoft.Win32.Registry class and to the System.Configuration namespace for
more detailed information and examples.
b) A "Preferences" web page of a Web application. Web applications most
often work with some kind of database and usually store all information
within the database. Please refer to the System.Data namespace documentation
for more info and examples.
c) Customer details in a desktop CRM application. Such complex applications
also usually rely on some kind of database or structured storage.
P.S. In fact, the question you are asking is too "broadband". I suggest you
are facing a particular problem, and if you would describe things you want
to achieve, I think the community could came up with more detailed advice.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Suresh Kumaran" <ku********@hotmail.com> wrote in message
news:0e****************************@phx.gbl... Dmitriy,
What would be the best option to do this? Do you have a sample coding on this?
Thanks in advance,
Suresh
Dmitriy,
Thanks for your reply.
All right, here's what I want. My application is being
developed using VB.NET The design is this.
A. Form 1 designed for user to enter the part number. Form
1 has two buttons "Okay" and "Cancel" If the user
clicks "Okay", a textfile is validated and read for the
details of the partnumber,and the part number is passed as
aparameter to form 2.
B. Form 2 shows all other details of the partnumber such
as drawing date, approved date, description etc. These
values are placed on Form 2. Three button are availableon
form 2, "SAVE" "CANCEL" "EXIT" The user is allowed to
change any other details of the part number other than the
part number. User changes any details saves and exit the
application.
The requirement is that, if the user comes back the
application the second time around. I should be able to
show the partnumber he/she was working on in the Form 1.
How do I retain this value and show it?
Hope I have explained.
Suresh -----Original Message----- Suresh,
See, there is no single "best" option. I could just give
some examples onwhich way fits best the nature of the application:
a) An "Options" dialog box of a desktop application.
Usually settings arestored in the registry or in a configuration file. Please
refer to theMicrosoft.Win32.Registry class and to the
System.Configuration namespace formore detailed information and examples.
b) A "Preferences" web page of a Web application. Web
applications mostoften work with some kind of database and usually store
all informationwithin the database. Please refer to the System.Data
namespace documentationfor more info and examples.
c) Customer details in a desktop CRM application. Such
complex applicationsalso usually rely on some kind of database or structured
storage. P.S. In fact, the question you are asking is
too "broadband". I suggest youare facing a particular problem, and if you would
describe things you wantto achieve, I think the community could came up with more
detailed advice. -- Dmitriy Lapshin [C# / .NET MVP] X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx Bring the power of unit testing to VS .NET IDE
"Suresh Kumaran" <ku********@hotmail.com> wrote in message news:0e****************************@phx.gbl... Dmitriy,
What would be the best option to do this? Do you have a sample coding on this?
Thanks in advance,
Suresh
.
Dmitriy,
Thanks for your reply. My choice was a text file too. Just
curious to know how do you code the values to the
registry? Do you have a sample. 'Cos I have not written
any codes before to write to the registry. Also won't the
registry cause a security issue when deploying the project?
Suresh -----Original Message----- Suresh,
Now I see. I think registry or a simple text file would
be the best choicehere. When the user closes the Form 1, read the text box
value and save itto the registry/file with the appropriate Framework
classes. And upon Form 1start-up, check whether you have previously stored value
and pre-populatethe text box.
-- Dmitriy Lapshin [C# / .NET MVP] X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx Bring the power of unit testing to VS .NET IDE
"Suresh Kumaran" <ku********@hotmail.com> wrote in message news:1a****************************@phx.gbl... Dmitriy,
Thanks for your reply.
All right, here's what I want. My application is being developed using VB.NET The design is this.
A. Form 1 designed for user to enter the part number.
Form 1 has two buttons "Okay" and "Cancel" If the user clicks "Okay", a textfile is validated and read for the details of the partnumber,and the part number is passed
as aparameter to form 2.
B. Form 2 shows all other details of the partnumber such as drawing date, approved date, description etc. These values are placed on Form 2. Three button are
availableon form 2, "SAVE" "CANCEL" "EXIT" The user is allowed
to change any other details of the part number other than
the part number. User changes any details saves and exit the application.
The requirement is that, if the user comes back the application the second time around. I should be able to show the partnumber he/she was working on in the Form 1.
How do I retain this value and show it?
Hope I have explained.
Suresh
>-----Original Message----- >Suresh, > >See, there is no single "best" option. I could just
give some examples on >which way fits best the nature of the application: > >a) An "Options" dialog box of a desktop application. Usually settings are >stored in the registry or in a configuration file.
Please refer to the >Microsoft.Win32.Registry class and to the System.Configuration namespace for >more detailed information and examples. > >b) A "Preferences" web page of a Web application. Web applications most >often work with some kind of database and usually store all information >within the database. Please refer to the System.Data namespace documentation >for more info and examples. > >c) Customer details in a desktop CRM application. Such complex applications >also usually rely on some kind of database or
structured storage. > >P.S. In fact, the question you are asking is too "broadband". I suggest you >are facing a particular problem, and if you would describe things you want >to achieve, I think the community could came up with
more detailed advice. > >-- >Dmitriy Lapshin [C# / .NET MVP] >X-Unity Test Studio >http://x-unity.miik.com.ua/teststudio.aspx >Bring the power of unit testing to VS .NET IDE > >"Suresh Kumaran" <ku********@hotmail.com> wrote in
message >news:0e****************************@phx.gbl... >> Dmitriy, >> >> What would be the best option to do this? Do you
have a >> sample coding on this? >> >> Thanks in advance, >> >> Suresh > >. >
.
"Suresh Kumaran" <ku********@hotmail.com> wrote in news:1a2c01c372e2
$4****************@phx.gbl: Dmitriy,
Thanks for your reply.
All right, here's what I want. My application is being developed using VB.NET The design is this.
A. Form 1 designed for user to enter the part number. Form 1 has two buttons "Okay" and "Cancel" If the user clicks "Okay", a textfile is validated and read for the details of the partnumber,and the part number is passed as aparameter to form 2.
B. Form 2 shows all other details of the partnumber such as drawing date, approved date, description etc. These values are placed on Form 2. Three button are availableon form 2, "SAVE" "CANCEL" "EXIT" The user is allowed to change any other details of the part number other than the part number. User changes any details saves and exit the application.
The requirement is that, if the user comes back the application the second time around. I should be able to show the partnumber he/she was working on in the Form 1.
How do I retain this value and show it?
Hope I have explained.
Suresh
I wouldn't use a "simple text file". Use an Xml file. Do this the same
way as I descibed in your question about "Most Recent Document".
--
Michael Lang, MCSD
See my .NET open source projects http://sourceforge.net/projects/colcodegen/ (simple code generator) http://sourceforge.net/projects/dbobjecter (database app code generator) http://sourceforge.net/projects/genadonet ("generic" ADO.NET)
No I don't have a sample, but just look at the Microsoft.Win32.Registry
class documentation in the MSDN - I beleive there are several samples. As
for security issues, your code will need to be granted a RegistryPermission
with appropriate access rights. This is usually not a problem for desktop
applications running on a local machine, though.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Suresh Kumaran" <ku********@hotmail.com> wrote in message
news:1b****************************@phx.gbl... Dmitriy,
Thanks for your reply. My choice was a text file too. Just curious to know how do you code the values to the registry? Do you have a sample. 'Cos I have not written any codes before to write to the registry. Also won't the registry cause a security issue when deploying the project?
Suresh-----Original Message----- Suresh,
Now I see. I think registry or a simple text file would be the best choicehere. When the user closes the Form 1, read the text box value and save itto the registry/file with the appropriate Framework classes. And upon Form 1start-up, check whether you have previously stored value and pre-populatethe text box.
-- Dmitriy Lapshin [C# / .NET MVP] X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx Bring the power of unit testing to VS .NET IDE
"Suresh Kumaran" <ku********@hotmail.com> wrote in message news:1a****************************@phx.gbl... Dmitriy,
Thanks for your reply.
All right, here's what I want. My application is being developed using VB.NET The design is this.
A. Form 1 designed for user to enter the part number. Form 1 has two buttons "Okay" and "Cancel" If the user clicks "Okay", a textfile is validated and read for the details of the partnumber,and the part number is passed as aparameter to form 2.
B. Form 2 shows all other details of the partnumber such as drawing date, approved date, description etc. These values are placed on Form 2. Three button are availableon form 2, "SAVE" "CANCEL" "EXIT" The user is allowed to change any other details of the part number other than the part number. User changes any details saves and exit the application.
The requirement is that, if the user comes back the application the second time around. I should be able to show the partnumber he/she was working on in the Form 1.
How do I retain this value and show it?
Hope I have explained.
Suresh
>-----Original Message----- >Suresh, > >See, there is no single "best" option. I could just give some examples on >which way fits best the nature of the application: > >a) An "Options" dialog box of a desktop application. Usually settings are >stored in the registry or in a configuration file. Please refer to the >Microsoft.Win32.Registry class and to the System.Configuration namespace for >more detailed information and examples. > >b) A "Preferences" web page of a Web application. Web applications most >often work with some kind of database and usually store all information >within the database. Please refer to the System.Data namespace documentation >for more info and examples. > >c) Customer details in a desktop CRM application. Such complex applications >also usually rely on some kind of database or structured storage. > >P.S. In fact, the question you are asking is too "broadband". I suggest you >are facing a particular problem, and if you would describe things you want >to achieve, I think the community could came up with more detailed advice. > >-- >Dmitriy Lapshin [C# / .NET MVP] >X-Unity Test Studio >http://x-unity.miik.com.ua/teststudio.aspx >Bring the power of unit testing to VS .NET IDE > >"Suresh Kumaran" <ku********@hotmail.com> wrote in message >news:0e****************************@phx.gbl... >> Dmitriy, >> >> What would be the best option to do this? Do you have a >> sample coding on this? >> >> Thanks in advance, >> >> Suresh > >. >
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: cgplays.com |
last post by:
I have a select-pulldown at http://computergroupplays.com/fb-pres2.asp
that changes the 3rd pulldown (Dbase) depending on what the user
enters in the 2nd (Wk). My associate wants the values inside...
|
by: JC |
last post by:
Hi,
I am a novice at .net and have created a page of text boxes that are
populated from a database. I want the user to be able to change the
values in the box then submit the page and have these...
|
by: Suresh Kumaran |
last post by:
How do you retain the last value the user keyed in a text
box? I should be able to show the values when the user
runs the executable for the second time.
Appreciate help.
Suresh
|
by: Bill |
last post by:
Hello,
Could anyone post some simple code or advise me on how I can display the SSN
number like *****7890 in a text box, even thought the user entered
1234567890, and the value of the variable...
|
by: loga123 |
last post by:
Hi All,
I am very new to .net and trying to develop a small application.
I am using asp .net 2.0.
I have a table control (server) in my code that has header row like
this.
<asp:Table...
|
by: php_Boi |
last post by:
i have designed an application that is a dynamic submission form. i
have text fields and listboxes. now i am able to retain the values of
the listboxes when i populate the listbox "manually"(single...
|
by: =?Utf-8?B?ZGVuIDIwMDU=?= |
last post by:
Hi,
Trouble in retaining values of dropdownlist, textboxes, and other
controls when
dropdownlist selectedindexchanged event is triggered, the controls are
inside a user control and this user...
|
by: coolguyraj |
last post by:
I have a PHP and javascript code to take value from two text boxes and calculate on triggering the "OnBlur" function and display in the third box.
The code works fine with one line item,If i have...
|
by: anusha.vempati9 |
last post by:
Hi All,
I am calling a cgi file from a perl module. The cgi file contains the
HTML form and some HTML fields(like check boxes).
In my logic, I am trying to submit the form and calling the same...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |