2013-09-03 5 views
0

사실, ClientScript을 사용하여 경고를 표시하려고했지만 표시되지 않습니다.알림을 표시 할 수 없습니다.

내 코드 :.

ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('File Downloaded at Location C:\\VOWF-Downloads\\');", false); 
System.Web.UI.ScriptManager.RegisterStartupScript(this, this.GetType(), "MsgBox", "File Downloaded at Location C:\\VOWF-Downloads\\", true); 

모두 코드 :(

+0

어디에서이 코드를 작성 했습니까? Asp.Net에 대해 이야기하고 있다고 가정 할 때 어떤 이벤트가 발생합니까? –

+0

Devexpress GridView의 grid_CustomButtonCallback – RealSteel

답변

0

가 DevExpress의 컨트롤이 콜백을 실행할 때 RegisterStartupScript를 사용하는 것은 불가능 작동하지 않습니다

a possible workaround

0

아래에보십시오 : -

ScriptManager.RegisterStartupScript(updatePanel, updatePanel.GetType(), "a_key", "<script type='text/javascript' src='yourfile.js'></script>", false); 

ScriptManager.RegisterStartupScript(updatePanel, updatePanel.GetType(), "a_key", "<script type='text/javascript'>alert('file downloaded');</script>", false); 

또한 ClientScript.RegisterStartupScript를 사용하고있는 첫 번째 행에서 include script 플래그가 false로 설정되어 있으며 귀하의 경우에 맞아야한다고 생각합니다.

관련 문제