Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

INSRT/mid use in VB.net

Posted on 2004-09-20
7
Medium Priority
?
205 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 2000 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
Technology Partners: 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!

 

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

Technology Partners: 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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

636 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