我的Xcode应用程序中有一个TextField。现在我需要从ashx页面获取一个值。当我在浏览器中打开ashx页面时,我可以看到它只显示一个值。我需要在TextField中显示该值。
这是ashx页面: somelink / Export.ashx F = GetClientBalance&安培;销= rsbtest&安培; includeCurrency =真
请帮帮我......
答案 0 :(得分:0)
可以在<的iframe> 例如:
<!DOCTYPE html>
<html>
<body>
<iframe frameborder="0" width="100%" height="50px" src="http://rsbtelemax.com/VSServices/Export.ashx?f=GetClientBalance&pin=rsbtest&includeCurrency=true" name="iframe_a"></iframe>
<p><a href="http://www.w3schools.com" target="iframe_a">W3Schools.com</a></p>
<p>When the target of a link matches the name of an iframe, the link will open in the iframe.</p>
</body>
</html>
答案 1 :(得分:0)
您可以使用NSURLConnection获取字符串数据。这是代码:
NSURLResponse *response;
NSError *error;
NSData *data = [NSURLConnection sendSynchronousRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://rsbtelemax.com/VSServices/Export.ashx?f=GetClientBalance&pin=rsbtest&includeCurrency=true"]] returningResponse:&response error:&error];
NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(error.description);
NSLog(string);