CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 4/26/2007 7:16:53 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 29 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
6 Items, 1 Pages 1 |< << Go >> >|
eniac0
Asp.Net User
Master page property not propagating4/26/2007 7:16:53 PM

0/0

I'm learning how to work with Master pages here to redo our interface. one of the thing i want to do is pass some title, header, footer info from the content page to the master page, since that info changes from page to page.

 I've read this article that i find relaly useful : http://www.odetocode.com/Articles/450.aspx

and in it, it explains that i can create a property in the masterpage to transfert info back & forth between the master page and the content page.

Now, i created my properties alright and it compiles, but my content page won't see it, it wont see the new properties. I've done everything the article says, can someone tell me what im doing wrong ? I'm guessing it has something to do with our namespace structure but i dont see why the new properties cannot be seen if everything compiles properly.

Here are a few snapshots from the code :

'Master page

<%@ Master Language="VB" AutoEventWireup="true" CodeBehind="Interdec.master.vb"  Inherits="Interdec.UILayer.Interdec" %>

Public Partial Class Interdec
Inherits System.Web.UI.MasterPage

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub

Public Property
PageTitle() As String
Get
Return
lblTitle.InnerText
End Get
Set
(ByVal value As String)
lblTitle.InnerText = value
End Set
End Property
End Class

 
'Login page

 
<%@ Page Language="vb" MasterPageFile="~/Interdec.Master" AutoEventWireup="true" 
Codebehind="Login.aspx.vb" Inherits="Interdec.UILayer.Login.Login"
EnableSessionState="False" enableViewState="True"%>
<%@ MasterType VirtualPath="~/Interdec.Master" %>

Public Overrides Sub FillLabels()

With MyBase.Resources
Master.ClaimantName = "wahtever" 'does not work Master.Page.Title = .GetString("3257") & " - " & .GetString("3009")
End Sub
 
haidar_bilal
Asp.Net User
Re: Master page property not propagating4/26/2007 7:39:18 PM

0/0

The code seems fine, having the MasterType shall make it work!

Are you getting any exceptions in your code?

Regards


Bilal Hadiar, MCP, MCTS, MCPD, MCT
Microsoft MVP - Telerik MVP
eniac0
Asp.Net User
Re: Master page property not propagating4/26/2007 7:49:33 PM

0/0

uh.... ok, i feel like a noob now.

 

ever since we converted from 1.1 to 2.0 we kept getting errors from our namespace when we reach for something using the complete namespace path.

 well, you're right, even though everything compiled and worked, looking at the list of errors, i saw an error in the designer.vb file, which was still using a complete reference, i guess vsnet 2005 is not too fond of those.

 
my code was

 

        Public Shadows ReadOnly Property Master() As Interdec.UILayer.Interdec
            Get
                Return CType(MyBase.Master, Interdec.UILayer.Interdec)
            End Get
        End Property

 

While it should have been

 

        Public Shadows ReadOnly Property Master() As UILayer.Interdec
            Get
                Return CType(MyBase.Master, UILayer.Interdec)
            End Get
        End Property

 
 and i hadnt seen it yet because in my error list all there was were errors about images not having the right path. which is normal since im still in the middle of the conversion. then at the very end, was that error.

 

i feel bad for posting about it but im relieved that its nothing serious :)

 

Thanks. 

haidar_bilal
Asp.Net User
Re: Master page property not propagating4/27/2007 1:23:53 PM

0/0

Can I understand you solved the problem? Well, nothing comes at ease!

Good Luck,

Regards


Bilal Hadiar, MCP, MCTS, MCPD, MCT
Microsoft MVP - Telerik MVP
eniac0
Asp.Net User
Re: Master page property not propagating4/27/2007 5:16:20 PM

0/0

as it turns out, i had answered too quickly, im still new to .net 2005 and i hadn't understood that the designed.vb file is generated by .net 2005, so any change i made there was eventually changed again by .net

but knowing the error put me on the right track. in the end, i just changed the "inherits" attribute of the @master directive and it worked.

haidar_bilal
Asp.Net User
Re: Master page property not propagating4/27/2007 6:10:48 PM

0/0

I recommend you get a Blog and post about that! You are new to ASP.NET 2.0, you will find so many things on your way, that so many beginners like you will find those findings helpfull!

Best Regards

 


Bilal Hadiar, MCP, MCTS, MCPD, MCT
Microsoft MVP - Telerik MVP
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Visio 2003 Developer's Survival Pack Authors: Graham Wideman, Pages: 522, Published: 2003
F. Scott Barker's Access 2002 Power Programming Authors: F. Scott Barker, Pages: 960, Published: 2001

Web:
One-stop for information related to SharePoint: Master Pages ... Developers can better use their time and resources by making design changes in one place and propagating the changes to all pages that use the master page. ...
TheMSsForum.com >> Windows Services >> Content Type Changes Not ... Tag: Content Type Changes Not Propagating to Lists Tag: 60669 .... to be opened wiht same look and feel as that of masterpage and do the necessary actions. ...
Merge replication - indexes not propagating down to subscribers ... The only 'index'-like property that's set to false is the XML one, ... Answer Re : Merge replication - indexes not propagating down to subscribers ...
Release Notes CSSToXSLFO 1.5 21st August 2007 1. Requirements You ... Aug 21, 2007 ... Add the XSL-FO "force-page-count" property. - Implement markers with the limitation that the value "auto" is not supported for the the ...
Version Notes A problem with RadWindowManager not propagating boolean propertes' ... Content controls are now properly found when RadAjaxManager is in a Master Page. ...
propagating highbush by the Cooperative Extension Service or bias against those not mentioned. This bulletin becomes public property upon publication ...
HOL302: ASP.NET 2.0 Interoperability with Windows SharePoint ... available only in Windows SharePoint Services V3 master pages; it does not. apply to ASP.NET 2.0 master pages. The site property SPWeb. ...
Applied Mathematics and Computation : Symmetry group and non ... Now, based on the derived solution, we turn our attention to the not travelling wave excitations or not propagating waves, just as Wu et al. reported about ...
Recovery And Page Coherency For A Scalable Multicomputer Object ... for propagating changes to all workspace and reference. copies of the page at commit time .... dated master pages that have not already been written b#ack. ...
How to write a read/write master details page with Atlas? - Tales ... Everything propagates using these simple declarative bindings and we got to make a complete master/details page without writing a single line of client ...




Search This Site:










loginstatus control, when displaying "login" it takes me to an error page

code behind

treeview1.node.checked=true......?????

parser error message: it is an error to use a section registered as allowdefinition='machinetoapplication' beyond application level. this error can be caused by a virtual directory not being configured as an application in iis.

how can i get the name of a textbox when using master pages?

install visual web developer2005

adodb in asp.net

solution explorer filter

valid xhtml & treeview

custom system.security.principal.iprincipal class migrating to asp.net 2.0

acees to the path "c:\document and settings\username\mydocuments\visualstudioprojects\file.txt" is denied

show both catalogzone and editorzone simultaneously

shortcut key for switching between source and design view

photo thumbnail

sql script in utf-8 format

object reference not set to an instance of an object.?

problems with authentication web service using a database

datagrid helper class

why two databases?

how do i change the default banner ad to something custom?

membership/role provider methods (oracle)

custom controls

masterpage.master does not exist but only on nlb

onsendingmail event never fires.

treeview menu - sorting menu items

xml rss feeds

using my own vb.net code in dnn

problem with aps.net 2.0 master page. id's?

force logout when permissions not granted

problem in installing the web control

 
All Times Are GMT