473,394 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

user control header page in asp.net C#?

nirmalsingh
218 100+
Hai all,

I am new to asp.net c#. using visual studio 2005. my question is

i want to to use a header page(html) in all page in common. can i use user control like that or any other way and how? if so, i wish to keep login user's id in hidden text box of header page instead of maintaining it in session. is it possible to do like this?
another doubt is if i do so, i will get three pages in a screen such as header, content and footer. can i access value of content page in header using javascript? and content of hidden text value in content page?
thanx in advance.
May 29 '07 #1
1 2590
this is simple task

1. User Master Page. ( Master page is new concept in ASP.NET 2.0 )

2. Add Header user control in the Master page.

3. and set the Masterpage property of other pages to newly created masterpage.

Note:

you need to remove all HTML , HEAD , and Body, form tags from the content pages.

check MSDN for more help
May 29 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Michel | last post by:
Hi all, Maybe a stupid question, but I wondered if it was possible to access one of the public variables on the page from within a user control on that page? I would like to use a property in...
2
by: Owin | last post by:
Hi all, I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster. The control wordks great if autopostback is on. When...
4
by: owingruters | last post by:
Hi all, I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster. The control wordks great if autopostback is on....
0
by: syedsheeraz | last post by:
Hi all. Does anyone know if there is a way to gain programmatic access to the user control inside of a page after it has been cached? Let me elaborate more by telling you what I am doing. I am...
4
by: Matt Jensen | last post by:
Howdy all Been searching and can't find a good answer to my problem. I've got a usercontrol 'banner' at the top of my page, and when the selection in the dropdown list changes I want the "host"...
3
by: ivanpais | last post by:
Hi, I have a Web User Control, Lets say "Foo.ascx", that contains a button "btnFoo". I have a Master Page "Bar.master", that has a label "lblBar". This label is exposed by a public property...
3
by: CodeRazor | last post by:
I have a user contol hosted in a webform. The user control interfaces with an http component. When the user control loads, a request is sent to the http component. It takes around 10 seconds...
2
by: AlecL | last post by:
I have a page that has about 5 or 6 user controls ranging from hearders to footers to ad space but when I add a new user control which is a form it gives me the exception "page can have only one...
3
by: =?Utf-8?B?VDhS?= | last post by:
Ok...I've been looking for an answer to this problem and can't seem to find one...Framework 1.1 mind you. I have a base class that inherits from UserControl. I have 5 and soon to be 12 user...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.