modalpopupextender - two modal popup not working together asp.net -


i have 2 modal popup in page. first popup working expected. add second popup , working first popup stop responding code behind mp3.show(). both popups independent , second inside datalist. if remove second first work expected. below code.

<%@ page language="c#" autoeventwireup="true" codefile="test.aspx.cs" inherits="test" %>    <%@ register assembly="ajaxcontroltoolkit" namespace="ajaxcontroltoolkit" tagprefix="cc1" %>  <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">  <%@ register tagprefix="cp" tagname="titlebar" src="ucheaderjobseeker.ascx" %>  <html xmlns="http://www.w3.org/1999/xhtml">  <head runat="server">      <title>jquery ui autocomplete - multiple values</title>      <link href="~/styles/stylesheet.css" rel="stylesheet" type="text/css" />      <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" />      <script src="//code.jquery.com/jquery-1.10.2.js"></script>      <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>      <link rel="stylesheet" href="/resources/demos/style.css" />      <script type="text/javascript">          function showmodalpopup() {              var premium = document.getelementbyid("hdnpremium");              // if (premium.value == "3") {              $find("mpe").show();              return false;              //             }              //             else              //             { return true; }          }          function hidemodalpopup() {              $find("mpe").hide();              return false;          }      </script>  </head>  <body style="margin: 0px 0px 0px 0px;">      <form id="form1" runat="server">      <asp:scriptmanager id="scriptmanager1" runat="server">      </asp:scriptmanager>      <div style="float: right;">          <asp:linkbutton id="lnksignin" runat="server" text="sign in"></asp:linkbutton>          <cc1:modalpopupextender id="mp2" behaviorid="behavioridmp1" runat="server" popupcontrolid="panel2"              targetcontrolid="lnksignin" cancelcontrolid="btnsignincancel" backgroundcssclass="modalbackground">          </cc1:modalpopupextender>          <asp:panel id="panel2" runat="server" cssclass="modalpopup" align="center" style="display: none;              height: 230px; width: 300px;" defaultbutton="btnsignin">              <h1 style="font-variant: normal; font-family: comic sans ms; font-size: 1em; margin-left: 0px;                  margin-top: 0px; color: gray;">                  sign in</h1>              <asp:button id="btnsignin" width="100px" height="25px" runat="server" text="ok" causesvalidation="false"                  style="float: left;" />              <asp:hyperlink id="btnsignincancel" runat="server" text="cancel" cssclass="btnclosepopup">close</asp:hyperlink>          </asp:panel>          <div style="float: right; margin-right: 20px; margin-top: 0px;">              <div>                  <asp:hiddenfield id="hdnpremium" runat="server" value="0" />                  <asp:label id="lblusername" runat="server" visible="false" forecolor="blue" style="margin-top: 0px;                      float: right; margin-right: 10px;"></asp:label></div>              <asp:label id="lblpoints" runat="server" forecolor="#cc0066" style="float: left;"></asp:label>          </div>      </div>      <div style="float: right; display: block; margin-top: 10px; margin-right: 20px;">          <asp:linkbutton id="lnkreferselected" text="refer me in selected jobs" visible="true"              runat="server" onclick="refermultiple" style="background: #4e9caf; padding: 5px 15px 5px 15px;              text-align: center; border-radius: 5px; color: white; font-weight: bold; text-decoration: none;              margin-left: 10px;"></asp:linkbutton>          ​<%--<div class="divsignup" id="divfakereferselected" runat="server" text="refer me in selected jobs"                                              visible="true" style="background: #4e9caf; padding: 5px 15px 5px 15px; text-align: center;                                              border-radius: 5px; color: white; font-weight: bold; text-decoration: none; margin-left: 10px; cursor: pointer;">                                              refer me in selected jobs</div>--%>          <asp:linkbutton id="lnkfakepay" runat="server" style="display: none;"></asp:linkbutton>          <cc1:modalpopupextender id="mp3" behaviorid="behavioridmp3" runat="server" popupcontrolid="panel3"              targetcontrolid="lnkfakepay" cancelcontrolid="hplcancelpay" backgroundcssclass="modalbackground">          </cc1:modalpopupextender>          <asp:panel id="panel3" runat="server" cssclass="modalpopup" align="center" style="display: none;              height: 230px; width: 300px;">              <h1 style="font-variant: normal; font-family: comic sans ms; font-size: 1em; margin-left: 0px;                  margin-top: 30px; color: black; clear: both;">                  applying more than</h1>              <div style="text-align: center; margin-top: 30px; margin-bottom: 20px;">                  <asp:button id="btnpaymetconfirm" width="100px" height="25px" runat="server" text="ok"                      onclick="btnpaymetconfirm_click" causesvalidation="false" style="float: left;" />                  <asp:hyperlink id="hplcancelpay" runat="server" text="cancel" cssclass="btnclosepopup">cancel</asp:hyperlink>              </div>          </asp:panel>      </div>      <div style="width: 100%;">          <asp:datalist id="dljobs" runat="server" repeatdirection="horizontal" repeatcolumns="1"              datakeyfield="job_id" cellpadding="10" itemstyle-verticalalign="top" width="100%"              onitemcommand="dljobs_itemcommand">              <itemtemplate>                  <div style="margin-top: 0px; padding-top: 10px; padding-bottom: 10px; background-color: white;                      border: 1px solid #a6a6a6; width: 100%;">                      <div style="float: left; margin-top: 10px; margin-left: 10px;">                          <asp:checkbox runat="server" id="chkjob" />                      </div>                      <div style="float: left; margin-top: 10px; margin-left: 10px;">                          <img alt="noimage" src="images/companyblank.png" width="50px" height="50px" />                      </div>                      <div style="float: left; margin-top: 20px; margin-left: 10px;">                          <asp:label id="lblcompany" font-bold="true" forecolor="#004080" runat="server" text='<%# eval("emp_company").tostring() %>'></asp:label>                      </div>                      <div style="margin-top: 20px; float: right; margin-right: 30px;">                          <div style="color: #8b99a7; display: inline;">                              posted on:                          </div>                          <div style="display: inline;">                              <asp:label id="lblpostdate" runat="server" text='<%# eval("job_postdate", "{0:dd-mmm-yyyy}") %>'                                  forecolor="#21262c"></asp:label></div>                          <%--<div style="font-size: small; margin-left: 300px;">                                                              <a href='jobs.aspx?job_id=<%# eval("job_id") %>'>view details</a>                                                          </div>--%>                      </div>                      <%--<div>                                                          <asp:label id="lbljobtitle" font-bold="true" font-size="small" style="word-wrap: break-word;                                                              word-break: break-all; cursor: default;" runat="server" text='<%# eval("job_title") %>'                                                              forecolor="#ffa366"></asp:label>                                                      </div>--%>                      <div style="margin-top: 67px; margin-left: 40px;">                          <div style="float: left; color: #8b99a7;">                              skill:&nbsp;</div>                          <asp:label id="lblskills" style="margin-left: 40px;" font-bold="false" forecolor="#21262c"                              runat="server" text='abc'></asp:label>                      </div>                      <div style="margin-top: 7px; margin-left: 40px; float: left;">                          <div style="float: left; color: #8b99a7;">                              experience:&nbsp;</div>                          <asp:label id="lblexp" style="margin-left: 15px;" font-bold="false" forecolor="#21262c"                              runat="server" text='<%# eval("min_exp").tostring() + " - " + eval("max_exp").tostring() + " years"%>'></asp:label>                      </div>                      <div style="float: right;">                          <asp:panel id="pnlrequestreferral" runat="server">                              <div style="font-size: small; float: left;">                                  <asp:linkbutton id="lnkrefersinglejob" text="refer me" runat="server" commandargument='<%# eval("job_id") %>'                                      commandname="refersinglejob" style="background: #4e9caf; padding: 5px 15px 5px 15px;                                      text-align: center; border-radius: 5px; color: white; font-weight: bold; text-decoration: none;                                      margin-left: 10px;" visible='<%# convert.toboolean(eval("isnotreferred")) %>'></asp:linkbutton>                                  <asp:label runat="server" id="lblreferred" text="referral request sent" forecolor="#004080"                                      visible='<%# (int)eval("isnotreferred") == 1 ? false : true %>'></asp:label>                                  <%--<div class="divsignup" id="divreferme" runat="server" style="background: #4e9caf;                                                                  padding: 5px 15px 5px 15px; text-align: center; border-radius: 5px; color: white;                                                                  font-weight: bold; text-decoration: none; margin-left: 10px; cursor: pointer;">                                                                  refer me</div>--%>                              </div>                              <div style="font-size: small; float: right; margin-left: 20px;">                                  <asp:linkbutton id="lnkcontactreferrer" text="contact referrer" onclientclick="return showmodalpopup()"                                      runat="server" commandargument='<%# eval("job_id") %>' commandname="contactreferrer"                                      style="background: #4e9caf; padding: 5px 10px 5px 10px; text-align: center; border-radius: 5px;                                      color: white; font-weight: bold; text-decoration: none; margin-left: 5px; margin-right: 5px;"></asp:linkbutton>                                  <asp:linkbutton id="lnkdummy" runat="server" style="display: none;"></asp:linkbutton>                                  <cc1:modalpopupextender id="mp4" behaviorid="mpe" runat="server" popupcontrolid="pnlpopup"                                      targetcontrolid="lnkdummy" cancelcontrolid="btnhide" backgroundcssclass="modalbackground">                                  </cc1:modalpopupextender>                                  <asp:panel id="pnlpopup" horizontalalign="center" runat="server" cssclass="modalpopup"                                      style="display: none; height: 230px; width: 300px;">                                      <div style="float: left;">                                          name :</div>                                      <div style="color: black;">                                          <%# eval("first_name")%></div>                                      <br />                                      <div style="float: left;">                                          email :</div>                                      <div style="color: black;">                                          <%# eval("empemail_id")%></div>                                      <br />                                      <div style="float: left;">                                          contact :</div>                                      <div style="color: black;">                                          <%# eval("contact_number")%></div>                                      <br />                                      <br />                                      <asp:button id="btnhide" runat="server" text="close" onclientclick="return hidemodalpopup()" />                                  </asp:panel>                              </div>                          </asp:panel>                          <asp:panel id="pnlreferred" runat="server" visible='<%# convert.toboolean(eval("isnotreferred")) %>'>                              <div style="font-size: small; float: left;">                                  <asp:label id="lblrefrequest" text="referral request sent" visible="false" runat="server"                                      style="background: #4e9caf; padding: 5px 15px 5px 15px; text-align: center; border-radius: 5px;                                      color: white; font-weight: bold; text-decoration: none; margin-left: 10px;"></asp:label>                              </div>                              <div style="font-size: small; float: right; margin-left: 20px;">                                  <asp:label id="lblrefcontact" visible="false" runat="server" style="background: #4e9caf;                                      padding: 5px 15px 5px 15px; text-align: center; border-radius: 5px; color: white;                                      font-weight: bold; text-decoration: none; margin-left: 10px;"></asp:label>                              </div>                          </asp:panel>                      </div>                      <div style="margin-top: 7px; margin-left: 40px; float: left; clear: both;">                          <div style="float: left; color: #8b99a7;">                              location:&nbsp;</div>                          <asp:label id="lbllocation" style="margin-left: 25px;" font-bold="false" forecolor="#21262c"                              runat="server" text='<%# eval("job_location").tostring() %>'></asp:label>                      </div>                      <%--<div style="margin-top: 10px; margin-left: 40px; margin-bottom: 20px;">                                                      <div style="float: left; color: #8b99a7;">                                                          note:&nbsp;</div>                                                      <asp:label id="lblnotice" style="margin-left: 50px;" font-bold="false" forecolor="#21262c" runat="server"                                                          text='<%# eval("notice").tostring() %>'></asp:label>                                                  </div>--%>                      <div style="margin-top: 60px; margin-left: 40px; margin-bottom: 20px; clear: both;">                          <div style="float: left; color: #8b99a7; display: inline;">                              company:&nbsp;</div>                          <asp:label id="lblabtcompany" style="margin-left: 10px; display: inline; margin-top: 20px;"                              font-bold="false" forecolor="#21262c" runat="server" text='<%# eval("about_company").tostring() %>'></asp:label>                      </div>                  </div>              </itemtemplate>          </asp:datalist>      </div>      </form>  </body>  </html>

and code behind

protected void page_load(object sender, eventargs e)      {          string keyskills = "java";          string location = string.empty;          int recordcount = 0;            datatable dtjoblist;          datatable dtcompanylist;          dataset dsjobs = getsearchresult(keyskills, location, 1, ref recordcount, session["username"], 0);            dtjoblist = dsjobs.tables[0];          dtcompanylist = dsjobs.tables[2];            dljobs.datasource = dtjoblist;          dljobs.databind();      }                  protected void refermultiple(object sender, eventargs e)      {          mp3.show();      }        protected void btnpaymetconfirm_click(object sender, eventargs e)      { }        protected void dljobs_itemcommand(object sender, datalistcommandeventargs e)      {      }

this complete code if remove mp4 modal popup mp3 work fine.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -