this is my code when i click on login button........ NSString * post =[NSString stringWithFormat:@"urlstring",[[self.txtUsername text] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], [[self.txtPassword text] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSLog(@"%@",post);
NSData *postdata= [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
NSString *postLength=[NSString stringWithFormat:@"%lu",(unsigned long)[postdata length]];
NSMutableURLRequest *request= [[NSMutableURLRequest alloc]init];