有什麼辦法讓程序把我的字符串作爲一個整體嗎? 我在下面列出了一個例子 對於第二個例子,它不會將整個輸入作爲整個字符串。 hotmail.com是藍色(超鏈接),而ID = 50被識別爲字符串。我猜猜它的雙引號。我能做些什麼來解決這個問題?URL內的雙引號#
如:
1. string str = "hi";
2. string str = "http://hotmail.com/"id"=50";
實際的代碼我嘗試聲明:
string url = @"http://www.onemap.sg/advminimap/MiniMap.htm?mWidth=700&mHeight=600&searchval=&zoomLevl=7&iwt=[{""id"":2,""x"":""{0}"",""y"":""{1}"",""screenX"":undefined,""screenY"":undefined,""infoWindowText"":""{2}"",""postalCode"":""{3}"",""searchVal"":"""",""calloutWidth"":100,""calloutHeight"":100,""calloutTitle"":""{4}"",""zoomLevel"":7}, {""id"":3,""x"":""{5}"",""y"":""{6}"",""screenX"":undefined,""screenY"":undefined,""infoWindowText"":""{7}"",""postalCode"":""{8}"",""searchVal"":"""",""calloutWidth"":100,""calloutHeight"":100,""calloutTitle"":""{9}"",""zoomLevel"":7}]&check=true&calloutTitle=&calloutWidth=100&calloutHeight=100&isEdit=1&isSearch=0";
使用字符串2. @然後逃脫雙引號與雙雙引號,例如,'字符串str = @ 「http://hotmail.com/」, 「ID」, 「= 50」;' – ps2goat
嘗試 – Ofiris
雖然我必須說在GET url中使用json似乎是錯誤的 – ps2goat