Wrox Programmer Forums
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 23rd, 2009, 05:52 AM
Registered User
Join Date: Oct 2008
Posts: 5
Thanks: 3
Thanked 0 Times in 0 Posts
Default problem in master page

hii everyone!!!

i m working on a project of social website.i hav a problem that i hav passed user_ID through query string from login page(after successfull login) to account page.Now for account page there is a master page ,where in header i want to display the user name by using user_ID.how can i access the master page control in account page.cs file?

one more problem is that when i m writing anything in account page.cs file,it is appearing above the header that i have designed in master page instead of content place holder???

Old April 23rd, 2009, 12:32 PM
Friend of Wrox
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts

You're going to grab the parameter object from the query string and display using a LoginName control from the toolbox. LoginName is perfect because that's exactly what it displays if the user is login and has a login link if they have not.

Are you using a Response.Write? That's usually how I've seen it work, it writes at the beginning of the file, before the DOCTYPE and everything. Make sure you have a control with a text property, I prefer asp:Literal, and that you're setting it's Text property. (Assuming this is something different from the problem above, LoginName should display text, wherever you drop the control.

Good luck with Master Pages, I would never go back to trying to maintain my site without them. :)

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
The Following User Says Thank You to chroniclemaster1 For This Useful Post:
bond007 (April 23rd, 2009)

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in using styleshhet in master page CodeBest ASP.NET 2.0 Basics 3 February 7th, 2009 06:26 AM
Problem with Master Page PostbacURL property neil_dcruz_19 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 February 6th, 2009 06:29 AM
Problem loading graphics with master page fh84 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 January 18th, 2009 10:52 AM
problem with master page rendering in ch02 MM BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 December 5th, 2006 08:22 PM
Session Not available Problem in Master Page cbe_seenu ASP.NET 2.0 Professional 0 July 31st, 2006 08:47 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.