Wrox Programmer Forums
|
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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 15th, 2005, 10:36 AM
Registered User
 
Join Date: May 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Location.length=0

I am using the vb version of thePhile.
In the FillFoldersAndFilesTables() method in the browsefile.aspx for file manager, it has the following statement at about line 578 to 584

    Dim lastSlashIndex As Integer = folderPath.LastIndexOf("/")
                location = folderPath.Substring(0, lastSlashIndex)
                Response.Write("haha" & lastSlashIndex)
                Response.Write("haha1" & location)
        If location.Length = 0 Then
          location = Request.ApplicationPath.ToString()
        End If

Why we need the last 3 lines? What is the purpose to check for location.length=0?
 
Old June 21st, 2005, 01:14 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If he can't parse out a folder name he just sets it to the main application folder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
getting the length of an apstring 132591 C++ Programming 1 October 15th, 2006 10:46 PM
Max length venkata MySQL 2 May 3rd, 2006 12:39 AM
length crmpicco Classic ASP Basics 1 February 11th, 2005 11:24 AM
length of label lily611 General .NET 6 July 22nd, 2004 02:00 PM





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