I have only one content placeholder.my problem is earlier i had two content place holders.now i removed one.Then my master page design was showing while running.

but when i was removing that not needed content placeholder tag from all aspx pages, in the middle i saw that master page design is not getting dispalyed while running.
but in design mode,it is there .

one problem i notice is that earlier when i was running it,page url was in this format-'http://localhost:6344/WebSite2/home.aspx'

but now it is another one-'http://localhost:11328/WebSite2/login.aspx?ReturnUrl=%2fWebSite2%2fhome.aspx'.now even if I am navigating to another page,it is not going,it is showing the same login.aspx page

evenif my start page is home.aspx,login.aspx page is showing every time(masterpage content is not there).

for any aspx page,even if i am just clicking on view in browser,it is always showing login.aspx page.(masterpage content is not there)

please help me...

Recommended Answers

All 7 Replies

Member Avatar for stbuchok

Maybe you removed a needed placeholder by accident. Also the URL (or more accurately the port number) is different because you are using the Casini web server that is built into Visual Studio (or at least I'm assuming you are using Visual Studio and haven't changed an default settings).

Do you have authentication happening that redirects you to the Login page if you are not logged in?

Start from new website. and delete dafault.aspx page first. Then make a master page and then default page. when you create default page then select that master page.

Maybe you removed a needed placeholder by accident. Also the URL (or more accurately the port number) is different because you are using the Casini web server that is built into Visual Studio (or at least I'm assuming you are using Visual Studio and haven't changed an default settings).

Do you have authentication happening that redirects you to the Login page if you are not logged in?

yes,i have used authentication.signout() in my masterpage.aspx.cs to log out.the login url is to the home page from where user can log in.
but master page design is not displayed in that home page.only the text portions in master page are coming in home page
but after logging in, master page design is coming for rest of the pages.again after logging out, master page design goes.
how can i correct it?

You should not delete the "unneeded placeholder" because it is there for a reason.

Master pages act as components on a form, not a form in itself.

The one placeholder contains the master page's content while the other will contain the content page's content.

Hope this helps.

You should not delete the "unneeded placeholder" because it is there for a reason.

Master pages act as components on a form, not a form in itself.

The one placeholder contains the master page's content while the other will contain the content page's content.

Hope this helps.

no sir, in master page also i made that change.i removed that content place holder in master page also.then what is the problem that?

Member Avatar for stbuchok

OK, if you have removed a content placeholder and now things don't work, don't you think it might be needed?

Try putting it back and see if everything works again.

first content place holder corresponds to the head section and the later to the body section. i think u might have removed the body section and tried to insert the content into the content place holder that corresponds to the head section. try keeping the place holder with the id that of master page. i think it will help u.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.