MasterPages and Flash menu
-
Hello, I have a flash menu that includes category links to my aspx pages(and sub-categories). This flash menu is located on a MasterPage, and all of my content is inside a content place holder. Whenever i click an item in the flash menu, the flash reloads itself while entering the page, which is absolutely normal. I tried using Frameset in .Net it didnt work for me. tried also the UpdatePanel also didnt work, maybe I've done something wrong in there or whatsoever. Can anybody tell me please how to do this so the flash menu wont reload each time i click an item? Thanks.
-
Hello, I have a flash menu that includes category links to my aspx pages(and sub-categories). This flash menu is located on a MasterPage, and all of my content is inside a content place holder. Whenever i click an item in the flash menu, the flash reloads itself while entering the page, which is absolutely normal. I tried using Frameset in .Net it didnt work for me. tried also the UpdatePanel also didnt work, maybe I've done something wrong in there or whatsoever. Can anybody tell me please how to do this so the flash menu wont reload each time i click an item? Thanks.
How are you using the iframe and UpdatePanel? Anything that causes a postback will of course cause the page to reload and hence the Flash.
I know the language. I've read a book. - _Madmatt
-
How are you using the iframe and UpdatePanel? Anything that causes a postback will of course cause the page to reload and hence the Flash.
I know the language. I've read a book. - _Madmatt
-
i used the UpdatePanel by draging it to the masterpage and inside of it i draged my flash control, and pointed a trigger to the contentplaceholder. but that didnt work for me about the Iframe.. im not sure if i did it the right way.
Farraj wrote:
im not sure if i did it the right way
Neither am I, my mind reading ability is only good within 3 meters of someone. :rolleyes: Perhaps if you showed some code we could help.
I know the language. I've read a book. - _Madmatt
-
Farraj wrote:
im not sure if i did it the right way
Neither am I, my mind reading ability is only good within 3 meters of someone. :rolleyes: Perhaps if you showed some code we could help.
I know the language. I've read a book. - _Madmatt
update panel: masterpage cs code
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ScriptManager1.RegisterAsyncPostBackControl(ContentPlaceHolder1);
}
}aspx code:
<form id="form1" runat="server"> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <uc2:menu1 ID="menu11" runat="server" /> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="ContentPlaceHolder1" /> </Triggers> </asp:UpdatePanel> </form>
hmm...?
-
update panel: masterpage cs code
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ScriptManager1.RegisterAsyncPostBackControl(ContentPlaceHolder1);
}
}aspx code:
<form id="form1" runat="server"> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <uc2:menu1 ID="menu11" runat="server" /> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="ContentPlaceHolder1" /> </Triggers> </asp:UpdatePanel> </form>
hmm...?
"Controls that are triggers for an update panel cause a refresh of the panel's content after an asynchronous postback." http://msdn.microsoft.com/en-us/library/system.web.ui.asyncpostbacktrigger.aspx[^] So what you have configured is having the ContentPlaceHolder trigger a refresh of the UpdatePanel; however, I believe you want the reverse. Also, since ContentPlaceHolder has no events that can be triggered, nothing will happen. Finally, RegisterAsyncPostBackControl is the code behind is unnecessary since you have already specified it in the markup. As a matter of convention ScriptManager is usually added to the top of the form.
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>
<uc2:menu1 ID="menu11" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="menu1" /> </Triggers> </asp:UpdatePanel> </form>
I know the language. I've read a book. - _Madmatt
-
"Controls that are triggers for an update panel cause a refresh of the panel's content after an asynchronous postback." http://msdn.microsoft.com/en-us/library/system.web.ui.asyncpostbacktrigger.aspx[^] So what you have configured is having the ContentPlaceHolder trigger a refresh of the UpdatePanel; however, I believe you want the reverse. Also, since ContentPlaceHolder has no events that can be triggered, nothing will happen. Finally, RegisterAsyncPostBackControl is the code behind is unnecessary since you have already specified it in the markup. As a matter of convention ScriptManager is usually added to the top of the form.
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>
<uc2:menu1 ID="menu11" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="menu1" /> </Triggers> </asp:UpdatePanel> </form>
I know the language. I've read a book. - _Madmatt
-
"Controls that are triggers for an update panel cause a refresh of the panel's content after an asynchronous postback." http://msdn.microsoft.com/en-us/library/system.web.ui.asyncpostbacktrigger.aspx[^] So what you have configured is having the ContentPlaceHolder trigger a refresh of the UpdatePanel; however, I believe you want the reverse. Also, since ContentPlaceHolder has no events that can be triggered, nothing will happen. Finally, RegisterAsyncPostBackControl is the code behind is unnecessary since you have already specified it in the markup. As a matter of convention ScriptManager is usually added to the top of the form.
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>
<uc2:menu1 ID="menu11" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="menu1" /> </Triggers> </asp:UpdatePanel> </form>
I know the language. I've read a book. - _Madmatt