MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages... MVC, ASP.NET and master pages... MVC, ASP.NET and master pages... MVC, ASP.NET and master pages... MVC, ASP.NET and master pages... MVC, ASP.NET and master pages... MVC, ASP.NET and master pages... MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages... MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages...
Go Back  Xtreme Visual Basic Talk > > > MVC, ASP.NET and master pages...


Reply
 
Thread Tools Display Modes
  #1  
Old 10-05-2011, 01:33 PM
PrOpHeT's Avatar
PrOpHeTMVC, ASP.NET and master pages... PrOpHeT is offline
Hopelessly confused...

* Expert *
 
Join Date: Mar 2001
Location: Tyler, Tx.
Posts: 3,055
Default MVC, ASP.NET and master pages...


I have a site written in MVC, one of the pages I had to recreate as an ASP.NET page due to the fact it has controls that I cannot directly use in a MVC view.

I would like to iframe that page in the same site, the problem is that the master is being applied to the ASPX page when it loaded in the iframe, so I have a header, a frame, another header, and then the content.

Is there some directive by which you can tell a single page not to obey the site's formatting and display just as itself regardless?

I have googled all the ways I could think to ask the question and turning up pretty much blank, so I guess I am asking wrong or looking for a red herring...
__________________
When you earnestly believe you can compensate for a lack of skill by doubling your efforts, there's no end to what you can't do ;)

For the love of Gold...
Reply With Quote
  #2  
Old 10-05-2011, 04:59 PM
PlausiblyDamp's Avatar
PlausiblyDampMVC, ASP.NET and master pages... PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

If it is a normal asp.net webform then it should be getting it's masterpage from either the web.config or from the <@Page .... MasterPageFile="" in the html view.

If the particular page is configured to use a masterpage it might be easiest to just create a blank masterpage that just contains the <asp:contentplaceholder> tag required by the content page and configure the page to use this master.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #3  
Old 10-05-2011, 05:44 PM
PrOpHeT's Avatar
PrOpHeTMVC, ASP.NET and master pages... PrOpHeT is offline
Hopelessly confused...

* Expert *
 
Join Date: Mar 2001
Location: Tyler, Tx.
Posts: 3,055
Default

There is no master page specified in the page directive for this file or the web.config file.
I had assumed it was something in the MVC framework injecting it where I could not find it.

However, I have created a simple test project to illustrate the issue, which of course does not do it...

Weird, I think I will look away for a few hours and come back to see why it is doing what I am telling it to but not catching where....
__________________
When you earnestly believe you can compensate for a lack of skill by doubling your efforts, there's no end to what you can't do ;)

For the love of Gold...
Reply With Quote
  #4  
Old 10-05-2011, 06:07 PM
PlausiblyDamp's Avatar
PlausiblyDampMVC, ASP.NET and master pages... PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Are the pages inheriting the normal page class? If not it could be being set in the PreInit event of the page class. It might also be worth checking the Application_PreRequestHandlerExecute event in global.asax to see if anything i being set there.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #5  
Old 10-05-2011, 09:21 PM
PrOpHeT's Avatar
PrOpHeTMVC, ASP.NET and master pages... PrOpHeT is offline
Hopelessly confused...

* Expert *
 
Join Date: Mar 2001
Location: Tyler, Tx.
Posts: 3,055
Default

Ok, found it.

I had a view preprocessing the inputs to the webform, I was submitting a formatted string via javascript to the view that would then take that string and apply html formatting, so my page was being rendered in a view not the raw page hence the master page being applied.

It was an experiment gone wrong. I could not find the reference originally because the first submission to the view was from a location = ur... call in javascript.

Eeek, coded myself blind into a hole trying to bend MVC to how I was used to doing things rather than the leveraging the MVC model, after stepping away and coming back to look at it.. it was glaring where the mistake was.

Thanks for the look and comment though while I had a sanity check.
__________________
When you earnestly believe you can compensate for a lack of skill by doubling your efforts, there's no end to what you can't do ;)

For the love of Gold...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages... MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages... MVC, ASP.NET and master pages... MVC, ASP.NET and master pages... MVC, ASP.NET and master pages... MVC, ASP.NET and master pages... MVC, ASP.NET and master pages... MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages...
 
MVC, ASP.NET and master pages...
MVC, ASP.NET and master pages...
 
-->