iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Came across another possible problem with the WebContextMenu. This can be seen in the samples with a slight modification. The issue is when the control that is tied to the ConextMenu is in an UpdatePanel, any postback causes the context menu to disppaear.
To see the problem, open up the "BasicContextMenu.aspx" VB sample and add the following code right below the <form tag:
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <div> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Label ID="Label1" runat="server" /> <asp:Button ID="btn" runat="server" Text="Button" /> </ContentTemplate> </asp:UpdatePanel>
Change the ControlId of the WebContextMenu to "btn":
<ISWebDesktop:WebContextMenu ID="WebContextMenu1" runat="server" ControlId="btn">
In the Page_Load event in code-behind add:
Label1.Text = Date.Now
Now view the page in the browser (I'm using IE8) and right-click on the top button (labeled button). Notice the Context Menu is there. Now click on the button to cause a partial postback and then right-click on the button and notice the context menu is no longer there.
Any ideas? If I tie the context menu to the page this doesn't happen.
Hello,Thank you for the question.This issue occurs due to the ASP.NET Button’s ID value has changed when the Button is being rendered.The changing happen due to us set the ClienIDMode property to “AutoID”, in web.config file.The Button ID changed from: “btn” to “ctl00_content_btn”.If you want to link the Button, you should modify the ControlId value from “btn” to “ctl00_content_btn” as well.However, you could prevent the changing ID by set the ClienIDMode property to “Static”.
<asp:Button ID="btn" runat="server" Text="Button" ClientIDMode="Static" />
I attached the BasicContextMenu_Modified sample so that you could see the result.Hope this helps.Regards,Hans.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname