PC Review


Reply
Thread Tools Rate Thread

Condtional Region or Show/Hide Section

 
 
Steve Lewis - Website Nation
Guest
Posts: n/a
 
      12th Aug 2005
In Classic ASP, if I wanted to show or hide a section of a page, I could
simply do:

<% If Variable = X Then %>

<p> Html or anything else to hide here </p>

<% End If %>

What is the best way to do this in ASP.Net? I have come across
everything from toggling the display of a <div> to setting the value of
a label.



--
____________________________
Steven K. Lewis
Website Nation, LLC
Website Development Services
www dot Website Nation dot com
 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      13th Aug 2005
<asp:Panel id=_myPanel runat=server>.....nested stuff in here.....</asp:Panel>

Then in code, say in Page_Load:

void Page_Load(...)
{
bool MyCondition = DoSomeLogic();
_myPanel.Visible = MyCondition;
}


-Brock
DevelopMentor
http://staff.develop.com/ballen



> In Classic ASP, if I wanted to show or hide a section of a page, I
> could simply do:
>
> <% If Variable = X Then %>
>
> <p> Html or anything else to hide here </p>
>
> <% End If %>
>
> What is the best way to do this in ASP.Net? I have come across
> everything from toggling the display of a <div> to setting the value
> of a label.
>




 
Reply With Quote
 
Steve Lewis - Website Nation
Guest
Posts: n/a
 
      13th Aug 2005
Thanks, I just came across an article about this as an option. It will
def. work!
____________________________
Steven K. Lewis
Website Nation, LLC
Website Development Services
www dot Website Nation dot com


On 8/12/2005 7:14 PM, Brock Allen wrote:
> <asp:Panel id=_myPanel runat=server>.....nested stuff in
> here.....</asp:Panel>
>
> Then in code, say in Page_Load:
>
> void Page_Load(...)
> {
> bool MyCondition = DoSomeLogic();
> _myPanel.Visible = MyCondition;
> }
>
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>> In Classic ASP, if I wanted to show or hide a section of a page, I
>> could simply do:
>>
>> <% If Variable = X Then %>
>>
>> <p> Html or anything else to hide here </p>
>>
>> <% End If %>
>>
>> What is the best way to do this in ASP.Net? I have come across
>> everything from toggling the display of a <div> to setting the value
>> of a label.
>>

>
>
>

 
Reply With Quote
 
Patrick Olurotimi Ige
Guest
Posts: n/a
 
      13th Aug 2005
Hi Steve,
I'm interested in something related can you please post the article
link.
Thanks


*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Steve Lewis - Website Nation
Guest
Posts: n/a
 
      13th Aug 2005
http://www.dotnet101.com/articles/ar...nelControl.asp

I also found other articles via Google.
____________________________
Steven K. Lewis
Website Nation, LLC
Website Development Services
www dot Website Nation dot com


On 8/13/2005 2:59 AM, Patrick Olurotimi Ige wrote:
> Hi Steve,
> I'm interested in something related can you please post the article
> link.
> Thanks
>
>
> *** Sent via Developersdex http://www.developersdex.com ***

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hide country/region field smalltowngal Microsoft Outlook Discussion 1 1st Oct 2008 11:44 AM
How can I set an automated form to show/hide a section? =?Utf-8?B?TmF0YWxpZSBXLg==?= Microsoft Word Document Management 11 16th May 2007 01:59 AM
Can I Show/ Hide Hidden text by Section =?Utf-8?B?ZWRpdG9y?= Microsoft Word Document Management 2 12th Oct 2006 10:22 AM
In Excel is it possible to hide a row condtional upon a cell val.. =?Utf-8?B?TG91aXNl?= Microsoft Excel Misc 2 22nd Jul 2005 03:32 AM
Show/Hide Detail section by code lj Microsoft Access Reports 4 29th Feb 2004 05:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:30 AM.