TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kavi suja
NA
298
171.8k
Masterpage - How to display UserControl after page refresh
Jun 19 2013 8:14 AM
Hi,
I'am using Master Page and add several content pages.I've to display an company address in Master Page as Header.For the first time,when I login to the application the address from "Header.ascx" is properly displayed.But,when I do the action in Content Pages,then the address will be disabled.I'm trying to load the "Header.ascx" UserControl each and everytime the page loads.How I bring the address from "Header.ascx" in to masterpage each & every time the page loads?Can anyone help me to solve this isssue? (In Masterpage.Master.cs I include the "Header.ascx" as following:
TableRow _row = new TableRow();
TableCell _cell = new TableCell();
_row = new TableRow();
_row.ID = "CompanyHeaderRow";
tblMenu.Rows.Add(_row);
_cell = new TableCell();
_cell.ID = "CompanyHeaderCell";
// _cell.ColumnSpan = 2;
////UserControl uc = this.LoadControl("~/Header.ascx") as UserControl;
////_cell.Controls.Add(uc);
_cell.Controls.Add(LoadControl("Header.ascx"));
_row.Cells.Add(_cell);
But the address can't be displayed after the page refresh)
Reply
Answers (
2
)
How to access all pages of a website in C# or ASP.NET C#
Couldn't get Name of Webcam in Combo Box