Spillting of the string and retrving the ip adress and portno [Resolved]

Posted by Surajemo under C# on 3/30/2013 | Points: 10 | Views : 946 | Status : [Member] | Replies : 1
i have a string i want to retrieve ip adresss 192.168.1.60 foloweed by 9080
can any one give me a solution for this
"1SeI-19;Jaguar;02; ; ;BOTH;192.168.1.60 ;9080 ;N"




Responses

Posted by: Jayakumars on: 3/30/2013 [Member] [MVP] Bronze | Points: 50

Up
0
Down

Resolved
hi

try this code

string st1 = "1SeI-19;Jaguar;02; ; ;BOTH;192.168.1.60 ;9080 ;N";
string st2 = st1.Split(';')[6];
string st3 = st1.Split(';')[7];
Response.Write(st2 + st3);

Mark as Answer if its helpful to you

Surajemo, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response