Question

as u know , if master page in project root and a content page in a folder ,content page detect file paths from master page's sight! is there any way to change file path that are used in master page, for some content pages?? actually , can i change master page code programmitically for a specified content page in form_load or any where??

master page code

<head runat="server">
    <title>Test DateTimePicker </title>
    <asp:ContentPlaceHolder ID="ContentPlaceHolderHead" runat="server">
    </asp:ContentPlaceHolder>
    <link href="CSS/pwt-datepicker.css" rel="stylesheet" type="text/css" />

    <script src="JS/jquery.js" type="text/javascript"></script>
    <script src="JS/pwt-datepicker.min.js" type="text/javascript"></script>
    <script src="JS/pwt-date.js" type="text/javascript"></script>
    <script src="JS/pwt-datepicker.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:ContentPlaceHolder ID="ContentPlaceHolderBody" runat="server">

            </asp:ContentPlaceHolder>
        </div>
    </form>
</body>
Was it helpful?

Solution

i found my answer , just sit this symbol before file path "~/filepath.anything"
like this :

<script src="~/filepath/..." type="text/javascript" > </script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top