Solved

INSRT/mid use in VB.net

Posted on 2004-09-20
7
197 Views
Last Modified: 2006-11-17

How do I get the parsing on this in vb.net?

Given :  August 31, 2004. htm

I want to get  the result to show -    August 31, 2004

that is to the left of ".htm"



0
Comment
Question by:zachvaldez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 12109127
Hi there,

Dim Str As String = "August 31, 2004. htm"
Str = Str.SubString(0,Str.LastIndexOf("."))

Now the Str will have "August 31, 2004"

-Baan
0
 

Author Comment

by:zachvaldez
ID: 12109175
So in this case scenario DotNetLover, BTW ,THanks in a  million!
                  I'd like to get only the August 31,2004 from the August 31,2004.htm
                            how is that done please..
                       dra.name here is the full filename-  August 31,2004.htm

            For Each dra In diar1
                Dim dr As DataRow = ds.Tables(0).NewRow()
                dr(0) = dra.Name
                dr(1) = "c:\Events\HTML\" & dra.Name
                ds.Tables(0).Rows.Add(dr)
            Next
0
 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 500 total points
ID: 12109286
Here you go...

            For Each dra In diar1
                Dim dr As DataRow = ds.Tables(0).NewRow()
                dr(0) = dra.Name.SubString(0,dra.Name.LastIndexOf("."))
                dr(1) = "c:\Events\HTML\" & dra.Name
                ds.Tables(0).Rows.Add(dr)
            Next

-Baan
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

Author Comment

by:zachvaldez
ID: 12111950
IN this DDL, Id liek to see the first row blank so that the first data is in the second row when the selectedchanged index is fired.
thanks
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 12112091
Which DDL ? Where is ur DDL ? What are you doing in the selectedIndexChanged ? Please explain...
Note:  You can always do DDL.SelectedIndex = -1   to show blank.

-Baan
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 12112123
or, Insert a blank after populating the DDL:
DDL.Items.Insert(0, "--Select All--")    -OR- DDL.Items.Insert(0, "")
-Baan
0
 

Author Comment

by:zachvaldez
ID: 12113449
Wow! There many ways to do it then!
Thanks for your help and I'll try each way.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question