How to bind the arguments in NSString in iphone?
Posted
by Prash.......
on Stack Overflow
See other posts from Stack Overflow
or by Prash.......
Published on 2010-04-29T17:14:06Z
Indexed on
2010/04/29
17:17 UTC
Read the original article
Hit count: 227
iphone-web
Hi, i developing an application in which i want to bind my own parameter with an URL for http post request. But i findout the serious problem during the string binding, The code snippet as follows:
NSString *mainURL1 = @"http://xxx.xxx.xx.xx/webservice/Service.asmx?op=UserDetailsNew?"; NSString *mainURL2 = [mainURL1 stringByAppendingString:@"MobileNo=%@",txtMobile.text]; NSString *mainURL3 = [mainURL2 stringByAppendingString:@"&Country=%@",txtCountry.text]; NSString *mainURL4 = [mainURL3 stringByAppendingString:@"&UserName=%@",txtName.text]; NSString *mainURL5 = [mainURL4 stringByAppendingString:@"&ScreenName=%@",txtScreenname.text]; NSString *mainURL6 = [mainURL5 stringByAppendingString:@"&EmailId=%@",txtemailid.text]; NSString *mainURL7 = [mainURL6 stringByAppendingString:@"&Password=%@",txtpassword.text]; NSString *mainURL8 = [mainURL7 stringByAppendingString:@"&RetypePassword=%@",txtretypepassword.text]; NSString *mainURL9 = [mainURL8 stringByAppendingString:@"%20HTTP/1.1"];
on binding the runtime arguments it ginev me too many parameter appending in NSString function.
how i solve above problem?
© Stack Overflow or respective owner