Note that there are some explanatory texts on larger screens.

plurals
  1. POlink button click not getting fired
    primarykey
    data
    text
    <p>I am sorry I am repeating this question. Rather, I am having to repeat it. The last time I posted this, I dint get an answer. I have googled for more than 3 hrs, dint find an answer. Heres the html for the linkbutton and the modal popup. The link button is inside/on a tab panel and auto postback is set to true.</p> <pre><code>&lt;asp:LinkButton ID="lnkAddNewAddress" runat="server" OnClick="lnkAddNewAddress_Click"&gt;Click Here To Add New Address&lt;/asp:LinkButton&gt; &lt;asp:ModalPopupExtender ID="lnkAddNewAddress_ModalPopupExtender" runat="server" BackgroundCssClass="modalBackground" DynamicServicePath="" Enabled="True" PopupControlID="pnlMyAddressBook" TargetControlID="lnkAddNewAddress" ViewStateMode="Enabled" &gt; &lt;/asp:ModalPopupExtender&gt; </code></pre> <p>I want the clickevent of the linkbutton to fire which is not happening. However clicking on the link does open the modal popup extender (which is also something I want)... How do I get into the click event. I know that a postback is being avoided here because of the modal popup probably...but I dont the solution for it....</p> <p>The code on save button:</p> <pre><code> if(hdnfld.Value.ToString()!=null) { if(hdnfld.Value.ToString()=="Save") { SaveNewAddress(); } else { UpdateAddress(); } &lt;%@ Page StylesheetTheme="" Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmMyAccountMyProfile.aspx.cs" Inherits="WebApplication1.frmMyAccountMyProfile" %&gt; &lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %&gt; &lt;asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"&gt; &lt;script type="text/javascript"&gt; function CheckType(type) { document.getElementById("hdnfld").value = type; alert(document.getElementById("hdnfld").value); return false; } &lt;/script&gt; &lt;link href="Styles/myStyleSheet.css" rel="stylesheet" type="text/css" /&gt; </code></pre> <p></p> <pre><code>&lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt; &lt;div class="divwrap"&gt; &lt;table style="width: 100%; margin-right: 0px;"&gt; &lt;tr&gt;......... &lt;td&gt; &amp;nbsp;&lt;asp:LinkButton ID="lnkAddNewAddress" runat="server" OnClientClick="return CheckType('Save');"&gt;Click Here To Add New Address&lt;/asp:LinkButton&gt; &lt;asp:HiddenField ID="hdnfld" runat="server" /&gt; &lt;asp:ModalPopupExtender ID="lnkAddNewAddress_ModalPopupExtender" runat="server" BackgroundCssClass="modalBackground" DynamicServicePath="" Enabled="True" PopupControlID="pnlMyAddressBook" TargetControlID="lnkAddNewAddress" ViewStateMode="Enabled"&gt; &lt;/asp:ModalPopupExtender&gt; &amp;nbsp;........... &lt;asp:Button ID="btnEdit" runat="server" CssClass="roundcorner btn" OnClick="btnEdit_Click" OnClientClick="return CheckType('Edit');" Text="Edit" /&gt; &amp;nbsp; &lt;asp:Panel ID="pnlMyAddressBook" runat="server" BackColor="White" CssClass="roundcorner"&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload