Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
How to remove Drive Name
May 05, 2011
i have one application it contains one Textbox and Browse Button when i browse some folder from the path, it will show that folder name in textbox but if i select the only D:\ Then It will Show in TextBox but i want to remove that when i choose the Drive only. means if i select drive only then it will not work how to do please help me.
Posted Date: September 09, 2011 Points: 20
try this way...
DialogResult Result = openFileDialog1.ShowDialog();
if (Result == DialogResult.OK)
String Paths = openFileDialog1.FileName.ToString();
string Fname = Path.GetFileName(Paths);
textBox1.Text = Fname;
Regards, Lakshmi Naraayanan.S
To post reply
Related Questions Related Questions
how to remove Zero
How to remove "save image" on image hover....
How can we remove multiple save of a record in .aspx page when we refresh?
How to get USB drive letter of given VID PID
how to remove duplicate records from a datatable
how to remove the identity property from a Sql Server column?
How to remove namespace attribute from a xml file ?
Edit document remove request parameter
How to remove the lookup id displayed in spreadsheet separated by ;#id in custom list moss 2007
Latest Forum Questions From The Same Category
To Achieve draw wave form from speaker outputs.
How to display the text in the second ck editor with strikes while extracting from database
Mail is working but I want send two excel file to each different person
how to display child nodes with headers and keeping the child nodes in a table
In DataGrid I have Two Dropdownlist, One in Header template and Item Template
Display data directly from database table to PDF using stored procedures in asp.net C#
How to install and use Dev Express ?
Dialogbox Custom Control
Custom Control in Winforms
I just started learning c#.net console application
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend