简体   繁体   English

Windows Phone WebControl格式异常

[英]Windows phone webcontrol format exception

I have been using this code for a while working perfectly in my windows phone 7 app im constructing. 我一直在使用此代码一段时间,以在我的Windows Phone 7应用程序im构建中完美工作。 However all of a sudden it stops working and gives me a format exception error? 但是突然间它停止工作并给我格式异常错误? What i have i been doing wrong since i haven't change a bit in this code since it last worked perfectly? 自从上次完美运行以来,我没有对这段代码进行任何更改,我一直在做错什么?

String url = String.Format("http://www.bing.com/search?q={0}"); 
        webBrowser1.Source = (new Uri(string.Format(url), UriKind.Absolute));

You use the String.Format method but you don't specify any argument after the string. 您使用String.Format方法,但未在字符串后指定任何参数。

I think you are trying to do something like 我认为您正在尝试做类似的事情

String url = String.Format("http://www.bing.com/search?q={0}", keyword); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM