Master Pages.... functionality

Results 1 to 2 of 2

Thread: Master Pages.... functionality

  1. #1
    Join Date
    Dec 1969

    Default Master Pages.... functionality

    &#039;Lo<BR><BR>I&#039;ve been reading up on the ASP.Net 1.x and 2.0 implementations of Master Pages, and was wondering what the options are as far as programattically accessing controls and tags in other regions of the master page are.<BR><BR>Consider a site design I&#039;m working on right now... in the global header is a "userbar" that has two "modes", one shows a login form if the user isn&#039;t currently logged in, and if the user is logged in, then it shows user stats, such as private messages and shortcuts to their profile page, etc..<BR><BR>In order for the latter part to work, the control requires that it be passed an open SqlClient.SqlConnection object, how am I supposed to reference the userbar in master pages if it doesn&#039;t exist on the page itself?<BR><BR>Or more complex:<BR><BR>I have a global navbar... some parts of its contents change according to variables passed to it by the page containing it... The top part of the navbar contains links to named IDs in the page, such as #footer, and #comments, the Navbar changes which set of links is displayed by a public property "PageNav"<BR><BR>...It also has a database powered region and requires a SqlClient.SqlConnection object.<BR><BR>Any ideas?

  2. #2

    Default RE: Master Pages.... functionality

    "the control requires that it be passed an open SqlClient.SqlConnection object"<BR>***? Really bad idea.<BR><BR>The main option is FindControl. If you assume/require your masterTemplate to have certain things in it, you better not change those things.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts