Click here to Skip to main content
15,895,557 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Session Variables and WebServices Pin
N a v a n e e t h2-Aug-07 18:00
N a v a n e e t h2-Aug-07 18:00 
Questionrunning long task as background worker Pin
Nadia Monalisa2-Aug-07 11:39
Nadia Monalisa2-Aug-07 11:39 
AnswerRe: running long task as background worker Pin
Fred_Smith2-Aug-07 11:55
Fred_Smith2-Aug-07 11:55 
GeneralRe: running long task as background worker Pin
Nadia Monalisa2-Aug-07 12:13
Nadia Monalisa2-Aug-07 12:13 
AnswerRe: running long task as background worker Pin
Mircea Grelus2-Aug-07 18:54
Mircea Grelus2-Aug-07 18:54 
QuestionActive Directory search from ASP.NET Pin
Adam Maras2-Aug-07 10:08
Adam Maras2-Aug-07 10:08 
AnswerRe: Active Directory search from ASP.NET Pin
Tarakeshwar Reddy2-Aug-07 10:28
professionalTarakeshwar Reddy2-Aug-07 10:28 
Generalasp:Panel Visible="False" as not effect Pin
Ed.Poore2-Aug-07 9:26
Ed.Poore2-Aug-07 9:26 
I've just started dabbling in ASP.NET properly and might be missing something obvious here, in this snippet of code:
<asp:Panel ID="panRepresentatives" runat="server" Visible="<%#this.GetDefaultVisible() %>">
    <h1>Executive Committee Discipline Representatives</h1>
    <asp:Repeater ID="repRepresentatives" runat="server" DataSourceID="dsRepresentatives">
        <HeaderTemplate>...</HeaderTemplate>
        <ItemTemplate>...</ItemTemplate>
        <FooterTemplate>...</FooterTemplate>
    </asp:Repeater>
</asp:Panel>
What should happen is the panel should not be rendered when there are certain query strings passed to the page.  GetDefaultVisible is implemented as such:
protected bool GetDefaultVisible()
{
    if ((this.Request.QueryString["position"] == null) && (this.Request.QueryString["id"] == null))
        return true;
    return false;
}
Now above this in the page is another asp:Panel which is always displayed, but inside that is another asp:Repeater control and the visiblity of this is controlled by another method which matches the database Position against the position passed in the query string or the database Id against the query string id.  If they match then that particular panel is displayed, otherwise it's hidden.

The hiding / showing of panels is working fine in the code above this snippet but for the provided snippet the call to GetDefaultVisible is not happening at all Unsure | :~ , by stepping through the code I've verified that GetDefaultVisible is not called from the Visible="..." section of panRepresentatives.

Can anybody see what is wrong?  I can provide more code if required but it's tied up in database connectivity and it's not really relevant to the discussion.



GeneralRe: asp:Panel Visible="False" as not effect Pin
Tarakeshwar Reddy2-Aug-07 9:46
professionalTarakeshwar Reddy2-Aug-07 9:46 
GeneralRe: asp:Panel Visible="False" as not effect Pin
Ed.Poore2-Aug-07 9:49
Ed.Poore2-Aug-07 9:49 
GeneralRe: asp:Panel Visible="False" as not effect Pin
Tarakeshwar Reddy2-Aug-07 9:58
professionalTarakeshwar Reddy2-Aug-07 9:58 
GeneralRe: asp:Panel Visible="False" as not effect Pin
Ed.Poore2-Aug-07 10:00
Ed.Poore2-Aug-07 10:00 
GeneralRe: asp:Panel Visible="False" as not effect Pin
Ed.Poore2-Aug-07 9:52
Ed.Poore2-Aug-07 9:52 
QuestionTree Control within Grid Control using AJAX and ASP.Net Pin
TinyTin2-Aug-07 8:22
TinyTin2-Aug-07 8:22 
AnswerRe: Tree Control within Grid Control using AJAX and ASP.Net Pin
Imran Khan Pathan2-Aug-07 18:27
Imran Khan Pathan2-Aug-07 18:27 
GeneralRe: Tree Control within Grid Control using AJAX and ASP.Net Pin
TinyTin2-Aug-07 19:57
TinyTin2-Aug-07 19:57 
QuestionNews Scroller Pin
Bad Programmer2-Aug-07 8:07
Bad Programmer2-Aug-07 8:07 
AnswerRe: News Scroller Pin
Tarakeshwar Reddy2-Aug-07 9:21
professionalTarakeshwar Reddy2-Aug-07 9:21 
QuestionRe: News Scroller [modified] Pin
Bad Programmer2-Aug-07 12:03
Bad Programmer2-Aug-07 12:03 
AnswerRe: News Scroller Pin
Piyush Vardhan Singh2-Aug-07 19:33
Piyush Vardhan Singh2-Aug-07 19:33 
AnswerRe: News Scroller Pin
Piyush Vardhan Singh2-Aug-07 19:24
Piyush Vardhan Singh2-Aug-07 19:24 
QuestionUrgent ...... ****** Remote computer connection Pin
ciacia2-Aug-07 6:48
ciacia2-Aug-07 6:48 
AnswerRe: Urgent ...... ****** Remote computer connection Pin
Bino B3-Aug-07 7:12
Bino B3-Aug-07 7:12 
Questionline break with detailsview control Pin
orsini2-Aug-07 5:47
orsini2-Aug-07 5:47 
AnswerRe: line break with detailsview control Pin
Fred_Smith2-Aug-07 7:22
Fred_Smith2-Aug-07 7:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.