I am now creating a website.I v almost done for Login page,register page and change password page.I v created the masterpage which is masterpage.master
.
After i create a folder Accoumt and put all three pages ( login,register,changepassword aspx
) into this Account folder.My masterpage is not working there.Masterpage
cannot load in the folder
If i move those 3 pages outside of the folder...it works well.
Could you give me idea pls?
The master page in these 3 sentences are working at the ouside of the Account Folder.Otherwise it does not work...
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ChangePassword.aspx.cs" Inherits="Account_ChangePassword" Title="Change Password"%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Account_Login" Title="LoginPage" %>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register" Title=开发者_运维知识库"Register" %>
May be a silly answer, but have you tried this?
MasterPageFile="../MasterPage.master"
assuming that your master page is in the upper level from your pages.
give it a try and let me know.
精彩评论