i have a panel within an update panel in my page visible of panel is false by default and after asynchronous postback changes to true my problem is after postback location of panel change to top of page here is my code
<asp:Label runat="server" ID="lbl_caption_upload" Text="caption" CssClass="label"></asp:Label>
<asp:TextBox runat="server" ID="txt_caption_upload" TextMode="MultiLine" CssClass="textbox"></asp:TextBox>
<asp:RadioButtonList runat="server" ID="radio_view_upload" OnSelectedIndexChanged="radio_view_upload_SelectedIndexChanged" AutoPostBack="True">
<asp:ListItem text="custom"></asp:ListItem>
<asp:ListItem text="public"></asp:ListItem></asp:RadioButtonList>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="radio_view_upload" />
</Triggers>
<ContentTemplate>
<asp:Panel runat="server" ID="placeholder_panel" Visible="false" CssClass="hide">
<tr>
<td>
<asp:Label runat="server" ID="lbl_genre_upload" Text="genre" CssClass="label"></asp:Label>
</td>
<td>
<asp:CheckBoxList runat="server" ID="check_genre_upload" DataTextField="Title" DataValueField="ID" RepeatColumns="7" RepeatDirection="Horizontal" DataSourceID="datasource_genre_upload"></asp:CheckBoxList>
<asp:LinqDataSource ID="datasource_genre_upload" runat="server" ContextTypeName="Video_Hosting.L2SDataContext" EntityTypeName="" Select="new (Title, ID)" TableName="Genres" OrderBy="ID">
</asp:LinqDataSource>
</td>
</tr>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
and here is code for slectedindex change
protected void radio_view_upload_SelectedIndexChanged(object sender, EventArgs e)
{
if (radio_view_upload.SelectedIndex == 1)
{
placeholder_panel.Visible = true;
}
else
{
placeholder_panel.Visible = false;
}
}
after postback location of panel change to before first label
thanks for all of your answers