是否可以從aspx.cs後面的代碼動態添加javascript引用?從代碼後面添加JavaScript參考(C#)
像這樣:
private void AddScriptReference(string path)
{
//Add reference to <head></head>
}
應導致腳本引用被添加到頁面的頭,像這樣:
<html>
<head>
<script type="text/javascript" src="path-to-script.js"></script>
</head>
</html>
這可能嗎?
謝謝,我應該知道這個:P – Martin 2010-09-13 15:04:37