some times we need to show the status to the user if some log process is going on. also if any exception in that process.
for that if we will write the message to a textbox(textarea), it will look like realtime message as follow.
the textbox(textarea) control name is "txtStatus"
//each time append the new text to the previous text
txtStatus.Text += "Message from the businees logic to be displayed.";
// this main to just update the control , so that the new text will refreshed
txtStatus.Update();
yes.sudhanshu
Showing posts with label in dot net. Show all posts
Showing posts with label in dot net. Show all posts
Wednesday, February 9, 2011
Getting project current path in dot net
just use this to get the project current path.
soem times we need to create the log folder inside the project path with bin and other folders.
this is in windows application.
string path = Directory.GetParent(Path.GetDirectoryName(Application.StartupPath)).FullName;
yes.sudhanshu
soem times we need to create the log folder inside the project path with bin and other folders.
this is in windows application.
string path = Directory.GetParent(Path.GetDirectoryName(Application.StartupPath)).FullName;
yes.sudhanshu
Subscribe to:
Posts (Atom)