|
Hi,
I will give an exmaple. We have a list box and a text box. On click of a button the text box will get enabled and the text enterd in the text box will be displayed in the label on another button click. This data is not saved. Now when i close the application and run again the labels are empty. How to store the entered data and display it in label.
Thanks,
Santa
|
|
|
|
|
There are quite a few ways you can do this. What have you learnt on your course so far, that might be applicable? What have you tried?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Please tell me how to do it. The example which i have given above in the thread is what i have tried. But when we close the applicationa dn run it again i do not get the same names in the labels.
|
|
|
|
|
I'm not going to give you the solution to your homework!
You will have to think about it a bit, but I'll give you a few clues:
System.IO.File is one way.
System.Configuration is another.
There are (probably) a dozen or so ways this could be done. Have a look at Google, and try something. When you have a specific problem (other than "I can't do my homework") post some details of where you are stuck.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Information displayed in Windows (forms) is placed there by the application that owns the forms. Information entered by the user must be saved somewhere by the application if it is needed again. You must decide how and where to save it so that it is available next time you run the appication.
|
|
|
|
|
I am working on Web application. And i do not want to store the data in DB and bring it back from ther. IS there any other possible ways to do it.
TIA.
Thanks,
Santa.
|
|
|
|
|
Storing it in a DataBase may be the best option; it all depends on how your application works. As I said before you must decide where is the best place to store this information. See earlier suggestions, also consider a flat file, the Registry etc.
|
|
|
|
|
For a web app, the user may run it from any computer so storing stuff locally is unlikely to be what you want, a DB on the server is a good idea.
|
|
|
|
|
how execute exe files in C#.net?
|
|
|
|
|
Use using System.Diagnostics NameSpace.
Then use Process Class to Execute an Exe.
eg:
Process.Start("IExplore.exe")
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
If you need to pass some arguments to the exe file, here is an example
Process p = new Process();
ProcessStartInfo ps = new ProcessStartInfo();
p.StartInfo = ps;
ps.FileName = "file.exe";
ps.Arguments = "Some commandline arguments";
p.Start();
|
|
|
|
|
|
It seems you have joined code project Today . So welcome to CodeProject.
Mishra Aditi wrote: hi how r u???????
Please Don't SPAM.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
This forum is for C# programming questions, not illiteracy.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
None the better for having read your spam.
|
|
|
|
|
Hi,
i am developing text editor (windows application) by using c#.net.
in my text editor i am providing a rich text box to enter text.
it has multiple rich text boxes to make it act like multiple pages.
after entering text into some number of rich text boxes user can go for print.
printed pages should be in WYSIWYG format.
i am able to send all the text from all the pages to the printer. but my problem is i am unable to achieve WYSIWYG. that is
say for example in the first rich text box of my application have 30 lines then the printer is printing less than 30 lines per a page.
so finally i am trying to develop one application which is almost similar to MS WORD.
so please explain me how can achieve this ??
if you have solution please email me at
anilveeraghattapu@gmail.com
Thanks
Anil Veeraghattapu.
|
|
|
|
|
Firstly, do not post your email, unless you like spam.
Secondly, have you tried doing this?[^]
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
|
Isn't it though?
It is on my favourites for answering lazy questions.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
hey what do you mean
have you gone through my query
do you think does any body posts here if we got satisfied by google search
don't waste your time by posting these kinds of responses
i have already done with wysiwyg kind of printing
what i need is am unable arrange the test in the rich text boxes like how exactly the printer is printing
Thanks
Anil Veeraghattapu.
|
|
|
|
|
Anil709 wrote: hey what do you mean
have you gone through my query
Yes.
Anil709 wrote: do you think does any body posts here if we got satisfied by google search
Yes, frequently.
Anil709 wrote: don't waste your time by posting these kinds of responses
It's my time, I will do with it what I will. Thank you for your concern, though.
Anil709 wrote: have already done with wysiwyg kind of printing
what i need is am unable arrange the test in the rich text boxes like how exactly the printer is printing
Then perhaps you should have said this in your original post.
Anil709 wrote: Hi,
i am developing text editor (windows application) by using c#.net.
in my text editor i am providing a rich text box to enter text.
it has multiple rich text boxes to make it act like multiple pages.
after entering text into some number of rich text boxes user can go for print.
printed pages should be in WYSIWYG format.
i am able to send all the text from all the pages to the printer. but my problem is i am unable to achieve WYSIWYG. that is
say for example in the first rich text box of my application have 30 lines then the printer is printing less than 30 lines per a page.
so finally i am trying to develop one application which is almost similar to MS WORD.
so please explain me how can achieve this ??
if you have solution please email me at
anilveeraghattapu@gmail.com
Thanks
Anil Veeraghattapu.
By the way, perhaps you should review the meaning of "WYSIWYG" - rearranging what you see on the screen to match the printed output is more "WYGIWYGATIIWWYW"
"WYGIWYGATIIWWYW" = "What you get is what you get, and tough if it wasn't what you wanted"
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
what the hell are you talking
have you gone nuts ???
if you dont how work then go to hell, but don't waste our precious time.
if you keep on doing these stupid things i will report you as a spam
and the administrator will block you account, mind it.
|
|
|
|
|
veejay_veejay wrote: what the hell are you talking
have you gone nuts ???
if you dont how work then go to hell, but don't waste our precious time.
Who rattled your cage?
veejay_veejay wrote: if you keep on doing these stupid things i will report you as a spam and the administrator will block you account, mind it.
Please, be my guest. Go right ahead.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
i am inserting values of useridtxtbx and pwdtxtbx to database on submitbtn_click.Insert statement is not showing error while debugging ..but when the program runs it is giving syntax error..Below is my code
protected void submitbtn_Click(object sender, EventArgs e)
{
OleDbConnection con= new OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;data source = C:\\Documents and Settings\\swuser\\My Documents\\Clinical_Billing.mdb;" );
con.Open();
OleDbCommand cmd = new OleDbCommand("insert into user_login(user_id,password) values('" + useridtxtbx.Text + "','" + pwdtxtbx.Text + "'", con);
cmd.ExecuteNonQuery();
con.Close();
}
|
|
|
|
|
Use parameterized queries. You should be good then.
|
|
|
|