开发者

Problem with masterpage

<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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜