Re: Master Page Best Practice
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Fri, 15 Sep 2006 05:30:39 GMT
Hi Heaven,
Since client-side <script> tag can not be marked with "runat=server"(it
will make it be parsed as server-side code at compilation time), you can
consider embed some server code expression to render the dynamic resolved
path. For example:
==========================
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="<%=
ResolveUrl("~/scripts/common.js") %>"></script>
...................
=========================
BTW, when using the above embeded code block in <head> section, it will
make the Page.Header.Controls collection no longer modifiable(add nor
remove subcontrols in it). Therefore, if you may consider move the script
block into other postion in page if this is the case.
Please feel free to let me know if you have any other concerns on this.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- Re: Master Page Best Practice
- From: Steven Cheng[MSFT]
- Re: Master Page Best Practice
- References:
- Master Page Best Practice
- From: LaptopHeaven
- Re: Master Page Best Practice
- From: Steve C. Orr [MVP, MCSD]
- Re: Master Page Best Practice
- From: LaptopHeaven
- Master Page Best Practice
- Prev by Date: Re: How to skip some items of a repeater
- Next by Date: RE: precompile
- Previous by thread: Re: Master Page Best Practice
- Next by thread: Re: Master Page Best Practice
- Index(es):