Looking for string within a string
how can i get a string from within a string
i mean i want to get the url string[code] http://www.whatever.com/anylink/ from within anchor tag.
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Mahesh ChandRank #1 · 393.4K reputationPosted Feb 15, 2011, 1:10 AM EST
Here is a code example that will give you a substring starting at 5th char and next 3 characters.
string str = "Mahesh Chand";
string sub = str.SubString(5, 3);
If you do not know the length, you can use IndexOfAny and LastIndexOfAny methods to find out position of last "/" within a string.
Suthish NairRank #92 · 22.8K reputationPosted Feb 15, 2011, 10:11 AM EST
Did above solution helped you, or let us know.
If its to get url from anchor control, then its simple.
http://www.c-sharpcorner.com" runat="server" id="a1">clickSam HobbsRank #108 · 20.5K reputationPosted Feb 15, 2011, 11:20 PM EST