Issue with string in c#

Posted by user1740381 on Stack Overflow See other posts from Stack Overflow or by user1740381
Published on 2012-12-13T17:01:30Z Indexed on 2012/12/13 17:03 UTC
Read the original article Hit count: 228

Filed under:
|

I have a problem with string in c#. I have following string :

Here Fonts is the string array contains google fonts name :

string fontsLink = "<link rel='stylesheet' id='fontrequest' href='http://fonts.googleapis.com/css?family='" + Fonts + "type='text/css' media='all'>";

this string is rendering wrong in the browser :

<link rel="stylesheet" id="fontrequest" href="http://fonts.googleapis.com/css?family=" times+new+roman|offside|dangrek|days+onetype="text/css" media="all">

The problem is with the href attribute value. How can i solve this ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about string