I am struggling to find a solution in string manipulation – I am trying to extract a certain part of the string element after the ‘=’ character – say for ex.
dim s as string = "/mysite/secondary.aspx?id=1005"
I am trying to get the string after the “=” and just to grab the 1005. I tried indexof and split, but i am not sure where i am going wrong. Any help, please?
Here is what i did:
Dim lnk As String = "/mysite/secondary.aspx?id=1005"
Dim id As Long = lnk.IndexOf("=")
Dim part As String = lnk.Substring(id + 1, 4)
Thanks
Try the following
This will put “1005” into
value