Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 12th, 2014, 01:04 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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 :
wuyuchenlei@163.com i come from china ,sorry my english
Reply With Quote
  #2 (permalink)  
Old June 12th, 2014, 04:57 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 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!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
wuyuchenlei (June 12th, 2014)
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 10: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 11: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



All times are GMT -4. The time now is 03:28 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.