views:

25

answers:

1

i have to make a web request but It' format creating problem for me

it is like

i require www.abc.com?userID="YourUserID"

here the problem is i am creating following

NSURL * url = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.abc.com?userID=%@",myID]];

which will create a url with string www.abc.com?userID=12345

but i require www.abc.com?userID="12345"

i tried to put following

NSURL * url = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.abc.com?userID="%@"",myID]];

please help

+3  A: 
[NSURL URLWithString:
    [NSString stringWithFormat:@"http://www.abc.com?userID=\"%@\"", myID]];
zoul
+1--thank you zoul .....very fast !!
Ranjeet Sajwan