Prev: Populate Hidden field on post back and retrieve value from Hidden Field
Next: Hide column in ListView
From: shadow-monster via DotNetMonster.com on 24 Mar 2010 22:28 Good Day Can you help me create a code to trim this path upto "\" C:\Program Files\Distribute\mention.doc I want to remove mention .doc using the vb.net code -- Message posted via DotNetMonster.com http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net/201003/1
From: Mr. Arnold on 25 Mar 2010 00:33 shadow-monster via DotNetMonster.com wrote: > Good Day > > Can you help me create a code to trim this path upto "\" > > > C:\Program Files\Distribute\mention.doc > > > I want to remove mention .doc using the vb.net code > You use lastindexof to get the position in the string. And then you substring(0, lastindexof("\") + 1) ' that's + or - 1 http://www.lqnet.com/VB/VBNet_String.aspx path = path.substring(0, length) It's something like that. You'll figure it out.
From: Mark Rae [MVP] on 25 Mar 2010 03:49 "shadow-monster via DotNetMonster.com" <u58543(a)uwe> wrote in message news:a583cfea4752b(a)uwe... > Can you help me create a code to trim this path upto "\" > C:\Program Files\Distribute\mention.doc > I want to remove mention .doc using the vb.net code http://msdn.microsoft.com/en-us/library/system.io.path.getdirectoryname.aspx -- Mark Rae ASP.NET MVP http://www.markrae.net
From: shusta guthnar on 26 Mar 2010 13:19 I am haveing the understand you are much to removeing 'mention.doc'. Withs the outsides of useing you will be haveing happiness with trying references useing "../" Funs and Happinesses Shusta On Mar 24, 10:28 pm, "shadow-monster via DotNetMonster.com" <u58543(a)uwe> wrote: > Good Day > > Can you help me create a code to trim this path upto "\" > > C:\Program Files\Distribute\mention.doc > > I want to remove mention .doc using the vb.net code > > -- > Message posted via DotNetMonster.comhttp://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net/201003/1
From: shadow-monster via DotNetMonster.com on 28 Mar 2010 22:51
Mr. Arnold wrote: >> Good Day >> >[quoted text clipped - 3 lines] >> >> I want to remove mention .doc using the vb.net code > >You use lastindexof to get the position in the string. > >And then you substring(0, lastindexof("\") + 1) ' that's + or - 1 > >http://www.lqnet.com/VB/VBNet_String.aspx > >path = path.substring(0, length) > >It's something like that. You'll figure it out. Thanks Mr. Arnold I created a function to trim my path and I get my result. I also tried your code and it works as well without creating a function. Thanks again. :) -- Message posted via http://www.dotnetmonster.com |