Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css" />
    <script type="text/javascript">
        $(function () {
            $("#dialog").dialog({
                autoOpen: false,
                show: {
                    effect: "blind",
                    duration: 1000
                },
                hide: {
                    effect: "explode",
                    duration: 1000
                }
            });
            $("#btn").click(function () {
                $("#dialog").dialog("open");
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="dialog" title="Basic dialog">
        <p>
            This is an animated dialog which is useful for displaying information. The dialog
            window can be moved, resized and closed with the 'x' icon.</p>
    </div>
    <asp:LinkButton runat="server" ID="btn" Text="Clickme">
       <a id="btn">Cick</a>
    </form>
</body>
</html>

here this is my page here when iam using a html link button the pop up is opened... but when iam using asp.net link button its not opening.. tell me what is the problem
Posted
Updated 8-Jul-13 1:09am
v2

Modify something like

C#
<asp:linkbutton runat="server" id="btn" text="Clickme" OnClientClick="your function(); return false;"></asp:linkbutton>


Regards..:laugh:
 
Share this answer
 
v3
Hi,

Try with this,

JavaScript
$("#<%= btn.ClientID%>").click(function () {
    $("#dialog").dialog("open");
});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900