Wrox Programmer Forums
|
ASP.NET 4.5 General Discussion For ASP.NET 4.5 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4.5 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 27th, 2013, 02:54 AM
Registered User
 
Join Date: Sep 2013
Posts: 7
Thanks: 2
Thanked 0 Times in 0 Posts
Default Absolute Path of the folder.

Newbie... I am working on a project in MVC4 with MS SQL Server 2008 R2 where I have a functionality to save a file(.txt/.xls etc.) in a specified folder using Browse button. As of now I have hard-coded the same(viz NOT required). Problem is how can I get the absolute path of that folder so that I will use the same path to open the file for modification? Or is there any way to store the path of Browse button in a string using RegEx or the other way?
 
Old December 10th, 2013, 02:46 AM
Registered User
 
Join Date: Sep 2013
Posts: 7
Thanks: 2
Thanked 0 Times in 0 Posts
Default

You mean using RegEx?
 
Old February 5th, 2014, 10:01 PM
Friend of Wrox
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

Not following what you are wanting to do, typicaly if there is a browse button on a web page it is to locate a file on the client machine to attach it to the form for upload on post.

A RegEx is a class that ecapulsates the functionality of a regural express it does not store anything. It matches strings.
 
Old March 9th, 2014, 03:55 PM
Registered User
 
Join Date: Sep 2013
Posts: 7
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Well morgan, thanks for your post. It is like I need to save a file at a particular location. That is fine, but what I need to do in order to retrieve the path of the same folder?
 
Old March 11th, 2014, 11:09 PM
Friend of Wrox
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

If you are wanting client machines to connect to your web server and upload files to it. Them you should define a virtual file system that maps to physical file system, I do not recommend giving clients access to your real file system. The virtual file system can be DB driven where you store data such as a client information and file information such as virtual path (the path the client thinks they are accessing), and the physical path (were on disk the file is actually located). Then if a client then needs to access specific file from your web app then you can refernce it by the information that you have stored.
The Following User Says Thank You to mmorgan30 For This Useful Post:
Mohd Amir Ansari (March 12th, 2014)
 
Old March 12th, 2014, 01:47 AM
Registered User
 
Join Date: Sep 2013
Posts: 7
Thanks: 2
Thanked 0 Times in 0 Posts
Thumbs up Absolute Path of the folder.

I got it. The information you have provided is really useful.

Thanks a lot morgan.





Similar Threads
Thread Thread Starter Forum Replies Last Post
absolute path vs relative path for substitution group elements ptn77 XSLT 3 June 16th, 2011 10:04 AM
Relative and Absolute Path question Johnger Pro Visual Basic 2005 1 September 8th, 2006 10:45 AM
absolute path required?? atila Crystal Reports 0 April 29th, 2006 06:31 AM
VSProject need absolute path to the references acuze C# 0 April 18th, 2006 06:06 PM
Convert logical path to absolute path zoostar J2EE 1 April 15th, 2005 10:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.