views:

20

answers:

1

Hi there,

I have an ajax accordion in my web application. I have 2 HTML radio buttons; the first one is checked to show all the accordion header content,second one is to make a DIV block visible. Also the user can enter a text to search through Accordion headers, which is working fine. By default the DIV block is invisible, as soon as the user clicks on search radio button,the block becomes visible. I have a asp:button to rebound the accordion according to the search text.

However after I search, the block becomes invisible. Is there any way to keep this block visible?

Thanks in advance

A: 

So during your postback you must be setting the div to invisible again. Maybe something like this:

<div style="display:none;" id="thediv" runat="server">

or this

protected void Page_Load(object sender, EventArgs e)
{
    thediv.Style.Add("display", "none");      
}

You could try partial postbacks so that your div does not get re-rendered when the button postsback, or you could write some logic in your codebehind to ensure the div stays shown if the radio button is clicked.

Matt Dearing