开发者

Problem with masterpage

开发者 https://www.devze.com 2023-03-18 21:38 出处:网络
<configuration> <connectionStrings> <add name=\"AdventureWorks\" connectionString=\"Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\AdventureWorksLT2008_Data.mdf;Integrated
<configuration>
  <connectionStrings>
    <add name="AdventureWorks" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\AdventureWorksLT2008_Data.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
  </connectionStrings>



  <system.web>
    <pages masterPageFile="Navigation.master"/>
    <compilation debug="true" 开发者_如何学运维targetFramework="4.0"/>
  </system.web>
</configuration>

The Virtual path "Navigation.master" is not allowed here..

What am I doing wrong?


According to Microsoft documentation, masterPageFile attribute:

Specifies the master page path relative to the local configuration file.

So, you have to specify a relative path. For example, something like this:

<pages masterPageFile="~/Navigation.master"/>


Try adding:

˜/something.master

0

精彩评论

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