开发者

Any example for ResolveScriptReference? [closed]

Closed. This ques开发者_开发知识库tion does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 4 years ago.

Improve this question

Cannot find any example on Google.


You can find an example in the ScriptReferenceEventArgs docs on MSDN

Off the top of my head, you may use it to append the version to the script path so the client updates any stale cached javascript when you release a new version, like this:

ScriptManager1_ResolveScriptReference(object sender, ScriptReferenceEventArgs e)
{
    e.Script.Path += "?v=" + MyAppVersion;
}

SO uses this technique as well (though not the function, or webforms), look at the source of this page:

<link rel="stylesheet" href="http://sstatic.net/so/all.css?v=6638"> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜