Web Controls as Header Navigation

M

Manish

First of all let me state that I am new to .Net and C#.

I have 2 Web User Contols:
PageHeaderCAN.ascx
PageHeaderUSA.ascx

I have 1 aspx page
parts.aspx

Using the Solutions Explorer I drag and Dropped both CAN and USA user
controls to my page. Depending on the value of Session["Cntry"] I
want to display one or the other. In my page_load I tried the
following.

if(Session["Cntry"] == "C") {
PageHeaderCan1.Visible = true;
PageHeaderUsa1.Visible = false;
}
else {
PageHeaderUsa1.Visible = true;
PageHeaderCan1.Visible = false;
}

This doesn't work.
Can anyone help me with this problem?

Thanks,
Manish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top