我在其中用戶將打開文檔單擊一個LinkButton將打開的文檔特殊字符需要打開文件
if (e.CommandArgument.ToString().ToLower().IndexOf(".pdf") > 0)
ScriptManager.RegisterStartupScript(Page, this.GetType(), "myPopUp", "<script language='Javascript'>mywin=window.open('file:" + e.CommandArgument.ToString().Trim().Replace("\\", "/") + "', '', 'location=0,status=0,resizable=1,scrollbars=1,height=800px, width=1000px');</script>", false);
的路徑在這個應用程序時的文件名是像XYZ ##是讀爲XYZ#
,如果文件名是一樣的xyz#它是閱讀XYZ
任何解決方案?
這是C#嗎?我的錯。我沒有進入C#。抱歉。 – Niranjan
感謝您嘗試通過:) – Bebu
您可以閱讀[this](http://stackoverflow.com/questions/86477/does-c-sharp-have-an-equivalent-to-javascripts-encodeuricomponent)以獲取更多見解。 – Niranjan