Master page does not load in ASP.NET

Asked

Viewed 169 times

0

My master page does not click on ASP.NET. I know why it does not load, I do not know how to solve. The master page is in a folder behind the page "Isaque.aspx". Code :

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="isaque.aspx.cs" Inherits="isaque"MasterPageFile="../CommunityMasterPage.master"%>

Here a print:

Print

  • take a test, see if this is right: MasterPageFile="~/Community/CommunityMasterPage.master", just to exclaim, after the ~ you have to put the full path from the main system folder to the master page. Example, if my master gets in the way PastaRaizDoSistema/Pasta1/Pasta2/MinhaMasterPage.master I have to put ~/Pasta1/Pasta2/MinhaMasterPage.master, takes the test

  • worked, thanks!

  • Glad it worked out! I posted as an answer here, if you can give an upvote I appreciate it! Hug, and if you need anything I’m available!

  • I’d love to vote, but I’m under 15 in reputation, so I can’t vote.

  • No problem, man! Hug!

1 answer

0


To fix this problem, just add the path to the master page in this way:

MasterPageFile="~/Community/CommunityMasterPage.master

Just to exclaim, after the ~ have to put the full path from the system main folder to the master page.

Example, if my master gets in the way PastaRaizDoSistema/Pasta1/Pasta2/MinhaMasterPage.master I have to put ~/Pasta1/Pasta2/MinhaMasterPage.master, this way the system will always take the absolute path to the master page file.

I hope I helped, hug!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.