How to bind the arguments in NSString in iphone?
- by Prash.......
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?