Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
string nav = "http://www.google.com";           
webBrowser1.NavigateToString("<meta http-equiv='refresh'content='320;URL='"+nav+"'' />");

can i get url in as string to use in meta tag??? i am using wp7
Posted
Updated 23-Jan-13 5:36am
v2

1 solution

you can use something like this,

C#
string nav = "http://www.google.com"; 
string metaString="<meta http-equiv='refresh'content='320;URL='"+nav+"'' />";
XElement urlElement = XElement.Parse(metaString);
webBrowser1.NavigateToString(urlElement.Element("URL").Value);
 
Share this answer
 
Comments
Anandavel.p 30-Jan-13 9:06am    
XmlException was unhandled
'content' is an unexpected token. Expecting white space. Line 1, position 27.

this error throwing while i am executing ..........

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900