Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 18, 2012 05:04 AM by matifnadeem
0 Points
3 Posts
Dec 18, 2012 01:35 AM|LINK
hi all,
i have send the parameter to query string and it will return value like 0 or 1 or 2.
how can i get this value ? please help me
example:
https://api.twitter.com/1/users/profile_image?screen_name=twitterapi&size=bigger
it shows 1
how can i get this "1"
All-Star
31820 Points
6510 Posts
Dec 18, 2012 01:58 AM|LINK
try
string urlstr; urlstr = "https://api.twitter.com/1/users/profile_image?screen_name=twitterapi&size=bigger"; urlstr = urlstr.Replace("https://api.twitter.com/", ""); string valstr; valstr = urlstr.Split(new char[]{'/'}).First();
Participant
834 Points
253 Posts
Dec 18, 2012 02:38 AM|LINK
hi
please Check following
string tst = Request.QueryString["parametername"];
Contributor
4758 Points
1130 Posts
Dec 18, 2012 05:04 AM|LINK
aravindhrm example: https://api.twitter.com/1/users/profile_image?screen_name=twitterapi&size=bigger it shows 1 how can i get this "1"
Hi aravindhrm,
You can acheive any number either it is 1,2,3 or anything else by using substring method.
Checkout my code
string url = "https://api.twitter.com/1/users/profile_image?screen_name=twitterapi&size=bigger"; int index = url.IndexOf(".com"); int returnValue = Convert.ToInt32(url.Substring(index + 5, 1)); Console.WriteLine(returnValue);
Let me know if any query remains.
Cheers
aravindhrm
0 Points
3 Posts
How Get the response value from URL
Dec 18, 2012 01:35 AM|LINK
hi all,
i have send the parameter to query string and it will return value like 0 or 1 or 2.
how can i get this value ? please help me
example:
it shows 1how can i get this "1"oned_gk
All-Star
31820 Points
6510 Posts
Re: How Get the response value from URL
Dec 18, 2012 01:58 AM|LINK
try
string urlstr; urlstr = "https://api.twitter.com/1/users/profile_image?screen_name=twitterapi&size=bigger"; urlstr = urlstr.Replace("https://api.twitter.com/", ""); string valstr; valstr = urlstr.Split(new char[]{'/'}).First();hafizzeeshan
Participant
834 Points
253 Posts
Re: How Get the response value from URL
Dec 18, 2012 02:38 AM|LINK
hi
please Check following
Zeeshan Rauf
# 92-3216698206
Email : zeeshan_rouf@hotmail.com
Please mark the replies as answers if they help or unmark if not.
matifnadeem
Contributor
4758 Points
1130 Posts
Re: How Get the response value from URL
Dec 18, 2012 05:04 AM|LINK
Hi aravindhrm,
You can acheive any number either it is 1,2,3 or anything else by using substring method.
Checkout my code
string url = "https://api.twitter.com/1/users/profile_image?screen_name=twitterapi&size=bigger"; int index = url.IndexOf(".com"); int returnValue = Convert.ToInt32(url.Substring(index + 5, 1)); Console.WriteLine(returnValue);Let me know if any query remains.
Cheers
M Atif Nadeem
Mark as Answer if you got right thing
Read my blog | Follow me on LinkedIn