我已經場景,我想打開本地網頁(index.html的)查詢傳遞參數,我可以index.html中使用,但因爲它提供了錯誤按下面,我有問題,如何使用vb中的參數訪問本地網頁?
系統找不到指定的文件。
Vb.net代碼
Dim url As String = ConfigurationManager.AppSettings("Url")
url = url & "?id=" & txtFilePath.Text
//Url example
"C:\Program Files\Products\Bella\index.html?id=232"
Process.Start(url)
url會給你什麼樣的價值? – Mych
類似於「C:\ Program Files \ Products \ Bella \ index.html?id = 232」,但如果刪除查詢,則會打開我的默認瀏覽器。 – CodeBox
嘗試發送文件:/// C:/ Program Files/Products/Bella/index.html?id = 232或更好的文件:/// C:/Program%20Files/Products/Bella/index.html%3Fid= 232。同時檢查該文件:/// C:/ Program Files/Products/Bella/index.html?id = 232會在您將它粘貼到瀏覽器時給出您想要的結果。 – Mych