Solved

INSRT/mid use in VB.net

Posted on 2004-09-20
7
195 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
  • 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
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…

809 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