Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 June 12th, 2014, 12:04 AM
Registered User
 
Join Date: Jun 2014
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Default change the virtualpath and filename

i have a new program i want put the 13 chapter database ,the table picture.in the table ,the field imageurl's value is ~gagpics\filename.jpg. i want get the physical path c:\begaspnet\site\gagpics\filename.jpg how can i do

I want to ask the transformation path problem
for exaple
~gigpics\filename.jpg transformation c:\begaspnet\site\gigpics\filename.jpg or
~gigpics\filename.jpg transformation to d:\1\filename.jpg
mymail :
[email protected] i come from china ,sorry my english
 
Old June 12th, 2014, 03:57 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You can loop through the data (using ADO.NET, or Linq to SQL or Entity Framework), grab the path and replace the ~ with a hardcoded path. If you want to make the change in the database you can also use REPLACE in T-SQL to change the ` to a path.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
wuyuchenlei (June 12th, 2014)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Where the 'FileName' came from? SunsetFlorida BOOK: Beginning ASP.NET 4 : in C# and VB 1 April 6th, 2013 09:59 AM
<%@ MasterType virtualPath="~/EAD_EditGrid.master"%> not recognised MattHoff BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 1 July 27th, 2010 10:21 AM
filename validation mayuraprabhu Pro VB 6 1 December 15th, 2006 02:43 PM
Dynamic Filename ozPATT Access VBA 1 November 28th, 2005 01:56 PM
download button - dynamic change filename Tom_Nguyen Javascript How-To 1 November 28th, 2003 04:36 AM





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