I wanted to get the numerical numbers from a string, which I did.
I want to convert this char to any interger for the database but get the following error: Server Error in '/' Application.
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Code:
For Each File As FileInfo In New DirectoryInfo(("C:\Folder")).GetFiles("*.aspx", SearchOption.AllDirectories)
vFileName = File.FullName
Dim myChars() As Char = vFileName.ToCharArray()
Dim iChar As Integer = Convert.ToInt32(myChars)
iChar = Mid(1, 1, iChar)