473,473 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Is the .master extension of importance

WT
Hello,

I want to know if the .master is of any importance for a master page.
Could I have an .ascx extension and the <%@ Matser..%Directive inside,
will my page load using LoadControl from code ?

Thanks
CS
Feb 26 '07 #1
5 1889
I want to know if the .master is of any importance for a master page.

Yes.
..master is mapped to a special handler.
Could I have an .ascx extension and the <%@ Matser..%Directive inside,
will my page load using LoadControl from code ?
No.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
Feb 26 '07 #2
WT
I just finished my test and it loads perfectly.....
My expectation is that using masterpages in place of user controls, I could
have MatserPages in user controls...

More later.
CS
"MasterGaurav (www.edujini-labs.com)" <ga*****************@nospam.gmail.com>
a écrit dans le message de news: u6**************@TK2MSFTNGP05.phx.gbl...
>I want to know if the .master is of any importance for a master page.

Yes.
.master is mapped to a special handler.
>Could I have an .ascx extension and the <%@ Matser..%Directive inside,
will my page load using LoadControl from code ?

No.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------


Feb 26 '07 #3
Hello CS,

As Gaurav has mentioned, the Master page's "master" extension is a fixed
one which we have to adopt for master pages in our ASP.NET 2.0 application.
Also, since the master page is always requested/loaded by ASP.NET runtime
internally, it doesn't expect users to manually configuer handler for its
extensions in web.config(different from normal ASPX page).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 27 '07 #4
WT
Hi Steven,
My question is just in loading the control from code with LoadControl in the
PreInit phase.
Will itnormaaly run as a master page.
Response to-day for my test or before with you ?

Regards
CS
"Steven Cheng[MSFT]" <st*****@online.microsoft.coma écrit dans le message
de news: 3c**************@TK2MSFTNGHUB02.phx.gbl...
Hello CS,

As Gaurav has mentioned, the Master page's "master" extension is a fixed
one which we have to adopt for master pages in our ASP.NET 2.0
application.
Also, since the master page is always requested/loaded by ASP.NET runtime
internally, it doesn't expect users to manually configuer handler for its
extensions in web.config(different from normal ASPX page).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Feb 27 '07 #5
Thanks for your quick reply CS,

I think I may have somewhat misunderstand your scenario. If convenient,
would provide some code snippet about your loadcontrol logic in PreInit?

My original consideration is that you have an existing master page such as
site.master(as below)

===================
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="site.ascx.cs"
Inherits="Master_site" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
...............

====================

and you want to simply change its name to "site.ascx" or
"site.otherextension". Based on my test, this will raise error. If what you
do is simply use Page.LoadControl to load the "site.master" as a
usercontrol template, I think it will works, but since master page contains
many page level elements(such as server-side <form>), it may conflict with
the current page's form.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 27 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Raphael Gluck | last post by:
Hi Everyone I am having some problems with a master detail page i have set up to catalogue brochures from my site. On my master page www.tripakltd.com/brochures.asp users are invited to select...
3
by: Mike D | last post by:
The code below gives an error. Object doesn't support this property or method: 'myMail.Importance' How do I set importance on an email? Everywhere I have looked it looks like my syntax is right...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
4
by: pepcag | last post by:
I used http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconalteringsoapmessageusingsoapextensions.asp as a template to create a very simple web method with soap...
5
by: pb | last post by:
Do anyone know how to change the .aspx extension to something else, say ..sssx, for all or part of a ASP.NET 2.0 site? I recall a Microsoft article on this some time ago, but I cannot locate it.
17
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
3
by: nick | last post by:
I have the following code in my master page: <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0...
3
by: ningjun.wang | last post by:
I crate a new asp.net 2.0 web site using Visual Studio 2005. It run fine in visual studio. I then click Build Publish Website to build the dll and copy them to the IIS virtual directory along with...
3
by: Rohit | last post by:
I have added a "Master Page" and noticed it is having the extension ".master". I want to set this master page as default and want to open it as I open my web-site. I tried to set the startup...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.