I have this script in ASP.NET/C# - I trying to control when to show the balloon popup and as preliminary test I specifically instruct the popup extender not to show at any condition.
But it still shows on click..
How to tell the BalloonPopupExtender to disable itself and not to show at all?
(Later on I would like to enable it again to show - but that information is just to give a completion to why do I want it there in the first place..)
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:Panel ID="Panel1" runat="server">
Balloon Information1
</asp:Panel>
<ajaxToolkit:BalloonPopupExtender ID="BalloonPopupExtender1" runat="server" BalloonPopupControlID="Panel1" TargetControlID="Label1"
DisplayOnClick="False" DisplayOnFocus="False" DisplayOnMouseOver="False"></ajaxToolkit:BalloonPopupExtender>
</div>
</form>
</body>
</html>
Thank you for the answers, I appreciate it.
I found an easier way and ended up altering the code as follows to allow control of balloon appearance:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPage.aspx.cs" Inherits="d.TestPage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
<asp:Panel ID="Panel1" runat="server">
Balloon Information1
<ajaxToolkit:BalloonPopupExtender ID="BalloonPopupExtender1" runat="server" BalloonPopupControlID="Panel1" TargetControlID="Label1"
DisplayOnClick="False" DisplayOnFocus="False" DisplayOnMouseOver="False"></ajaxToolkit:BalloonPopupExtender>
</asp:Panel>
</div>
</form>
</body>
</html>
And this is the code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace d
{
public partial class TestPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Panel1.Visible = !Panel1.Visible;
//BalloonPopupExtender1.DisplayOnClick = false;
}
}
}