.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Imran Ghani
Sohaib Khalid

Home >> Code Snippets >> ASP.NET Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Splitting Functionalities

Posted By:Athira Sreejith       Posted Date: February 05, 2009    Points: 10    Category: ASP.NET Controls    URL: http://www.dotnetspark.com  

Splitting Functionalities



Dim fileTestname As String = "General(10-11-2006(335)).xml"

Dim userid As String = getuserId(fileTestname)

SaveAnswer(questionid, userid)


Private Function getuserId(ByVal filename As String)

Dim value As String = filename

Dim sites As String() = Nothing

Dim sep(5) As Char

sep(0) = """"

sep(1) = "("

sep(2) = "-"

sep(3) = ")"

'sep(4) = "]"

'sep(5) = """"

Dim x, y, z As String

Dim x1, x2 As Integer

x1 = 1

sites = value.Split(sep, 6)

Dim s1, s2 As String

For Each s1 In sites

If x1 = 2 Then

x = s1


End If

If x1 = 5 Then

y = s1


End If

x1 += 1



Return y

End Function


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend