Two ModalPopupExtenders used in the same way, only one works - c#

Within a gridview, I have an "Email" button and a "Delete" button that opens up a Modal popup window using the modalpopupextender. The problem is that the Email window opens when the button is clicked, but the Delete window does not open when its button is clicked. I am using both modalpopupextenders in the same way.
<asp:ButtonField ButtonType="Button" CommandName="Email" Text="Email" />
<asp:ButtonField ButtonType="Button" CommandName="Delete" Text="Delete" />
<%-- Email modal--%>
<asp:Panel ID="pnlPopupEmail" runat="server" Width="500px" Style="display: none">
<asp:UpdatePanel ID="updPnlEmail" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="btnShowEmail" runat="server" Style="display: none" />
<ajaxToolkit:ModalPopupExtender ID="mdlPopupEmail" runat="server" TargetControlID="btnShowEmail"
PopupControlID="pnlPopupEmail" CancelControlID="btnCancel" BackgroundCssClass="modalBackground" />
<div class="EmailPopup">
<table>
<tr>
<td>
To:
</td>
<td>
<asp:TextBox ID="EmailTo" runat="server" Width="350"></asp:TextBox>
</td>
</tr>
<tr>
<td>
From:
</td>
<td>
<asp:TextBox ID="EmailFrom" runat="server" Width="350"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Subject:
</td>
<td>
<asp:TextBox ID="Subject" runat="server" Width="350"></asp:TextBox>
</td>
</tr>
<tr>
<td></td>
<td> <asp:TextBox ID="EmailMessageBox" Width="350" Height="150" runat="server" TextMode="MultiLine" Wrap="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:LinkButton ID="SendBtn" runat="server" OnClick="SendBtn_Clicked" Text="Send" />
<asp:LinkButton ID="btnCancel" runat="server" Text="Cancel" CausesValidation="false" />
</td>
<td>
<asp:Label ID="theID" runat="server" Visible="false"></asp:Label>
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<%-- -----end email modal--%>
<%-- Start Delete Confirmation Modal --%>
<asp:Panel ID="DelConfirmPanel" runat="server" Width="500px" Style="display: none">
<asp:UpdatePanel ID="DelConfirmUpdatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID ="TESTLabel" runat="server" Text="Are you sure?" ></asp:Label>
<asp:Button ID="DelModalButton" runat="server" Style="display: none" />
<ajaxToolkit:ModalPopupExtender ID="modalPopUpDelConfirm" runat="server" TargetControlID="DelModalButton"
PopupControlID="DelConfirmPanel" CancelControlID="DeleteCancel" BackgroundCssClass="modalBackground" />
<div class="DeletePopup">
<asp:LinkButton ID="DelConfirmedButton" runat="server" OnClick="DeleteConfirmation_Clicked"
Text="Delete" />
<asp:LinkButton ID="DeleteCancel" runat="server" Text="Cancel" CausesValidation="false" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<%-- End Delete Confirmation Modal --%>
</div>
Then in the codebehind I have a method that checks the command name and updates the updatepanel and shows the modalpopupextender.
protected void btn_Clicked(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Email")
{
// a bunch of stuff that I am leaving out but is just changing fields in the
//table withing the modal popup
updPnlEmail.Update();
mdlPopupEmail.show();
}
if (e.CommandName.Equals("Delete"))
{
int index = Convert.ToInt32(e.CommandArgument);
String id = gvReservations.DataKeys[index].Value.ToString(); // get id
try
{
DelConfirmUpdatePanel.Update();
modalPopUpDelConfirm.Show();
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
}
Any ideas why one works and not the other? Is there a good way to debug this kind of error? Thanks a lot for any help!

Figured it out.
<asp:ButtonField ButtonType="Button" CommandName="Delete" Text="Delete" />
This is where the problem was. I didn't realize that "Delete" was a reserved command name. So when this button was clicked an exception was being thrown saying that it couldn't delete from the table. Thus, the modal popup was never being shown. I figured it out by opening the javascript console in the chrome tools.
So to fix it, I changed the command name to something else and now everything works as expected.

Related

I'm at lost with my error regarding c# code (asp.net) web application

LinkButton btnCerFormsMon_Print = (LinkButton)sender;
Repeater Item = (Repeater)btnCerFormsMon_Print.NamingContainer;
Label referenceNo = (Label)Item.FindControl("rptrControlNo");
Label name = (Label)Item.FindControl("rptrRequester");
Label employeeNo = (Label)Item.FindControl("rptrEmployeeNo");
Label entryDate = (Label)Item.FindControl("rptrEntryDate");
Label document = (Label)Item.FindControl("rptrDocu");
Label Approver = (Label)Item.FindControl("rptrApprover");
Label requestStatus = (Label)Item.FindControl("rptrReqStatus");
Label rejectRemarks = (Label)Item.FindControl("rptrRejectRemarks");
hide_rptrControlNo.Text = referenceNo.Text;
hide_rptrStatus.Text = requestStatus.Text;
The code above produces the following error message.
Additional information: Unable to cast object of type 'System.Web.UI.WebControls.RepeaterItem' to type 'System.Web.UI.WebControls.Repeater'.
Markup:
<asp:Repeater runat="server" ID="rptrCERFormsMonItems">
<ItemTemplate>
<tr>
<td class="col-xs-1 col-sm-1">
<asp:UpdatePanel runat="server" ID="UpdatePanelRepeater" UpdateMode="Conditional">
<Triggers></Triggers>
<ContentTemplate>
<asp:LinkButton runat="server" class="btn btn-sm btn-default" ID="btnCERFormsMon_Print" OnClick="btnCERFormsMon_Print_Click" CausesValidation="false" Text="<i class='fa fa-print' aria-hidden='true'></i> PRINT"></asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td class="col-xs-1 col-sm-1">
<asp:Label runat="server" ID="rptrControlNo" Text='<%#Eval("DI_REFERENCENO")%>' Style="text-transform: uppercase" />
</td>
<td class="col-xs-2 col-sm-2">
<asp:Label runat="server" ID="rptrRequester" Text='<%#Eval("DI_REQUESTEDBY")%>' Style="text-transform: uppercase" />
</td>
<td class="col-xs-2 col-sm-2">
<asp:Label runat="server" ID="rptrEmployeeNo" Text='<%#Eval("DI_EMPLOYEENO")%>' Style="text-transform: uppercase" />
</td>
<td class="col-xs-1 col-sm-1">
<asp:Label runat="server" ID="rptrEntryDate" Text='<%#Eval("DI_ENTRYDATE")%>' Style="text-transform: uppercase; float:right;" />
</td>
<td class="col-xs-1 col-sm-1">
<asp:Label runat="server" ID="rptrDocu" Text='<%#Eval("DI_DOCUMENTTOREQUEST")%>' Style="text-transform: uppercase" />
</td>
<td class="col-xs-2 col-sm-2">
<asp:Label runat="server" ID="rptrApprover" Text='<%#Eval("DI_APPROVER")%>' Style="text-transform: uppercase" />
</td>
<td class="col-xs-1 col-sm-1">
<asp:Label runat="server" ID="rptrReqStatus" Text='<%#Eval("DI_REQUESTSTATUS")%>' Style="text-transform: uppercase" />
</td>
<asp:Label runat="server" ID="rptrRejectRemarks" Text='<%#Eval("DI_REJECTREMARKS")%>' Visible="false" />
<asp:Label runat ="server" ID="rptrTime" Text='<%#Eval("DI_ENTRYTIME")%>' Visible="false" />
</tr>
</ItemTemplate>
</asp:Repeater>
Solved it. Unfortunately repeater is a method used for displaying and it cant find any item in the datatable when I bind it on my repeater so I have to use the repeaterItem method to cast repeater's obj.
RepeaterItem Item = (RepeaterItem)btnCerFormsMon_Print.NamingContainer;

ASP.NET (C#) - ListView

In past, i worked on ListViews (.net 2.0) using a custom Template field but what i am trying to achieve here is the following
I am now working on .net 4.6
So basically a list which shows items like above and on mouse-hover few options show up as shown in the following screenshot
I also have to trigger those option to do different things -
How can I do that in asp.net, may I please have some code references.
Cheers
P.S.
This is a rough example of how i am creating the List Item Template (as requested)
<asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1">
<AlternatingItemTemplate>
<table >
<tr>
<td ><asp:Image ID="image1" ImageUrl='<%# Bind("url") %>' runat="server" Width="98px" /> </td>
<td><h2><asp:Label ID="_label" runat="server" Text ='<%# Bind("title") %>'></asp:Label></h2><asp:Label ID="Label1" runat="server" Text ='<%# Bind("description") %>'></asp:Label></td>
</tr>
</table>
</AlternatingItemTemplate>
<EmptyDataTemplate>
No data was returned.
</EmptyDataTemplate>
<ItemSeparatorTemplate>
<br />
</ItemSeparatorTemplate>
<ItemTemplate>
<table >
<tr>
<td ><asp:Image ID="image1" ImageUrl='<%# Bind("url") %>' runat="server" Width="98px" /> </td>
<td><h2><asp:Label ID="_label" runat="server" Text ='<%# Bind("title") %>'></asp:Label></h2><asp:Label ID="Label1" runat="server" Text ='<%# Bind("description") %>'></asp:Label></td>
</tr>
</table>
</ItemTemplate>
<LayoutTemplate>
<ul id="itemPlaceholderContainer" runat="server" style="">
<li runat="server" id="itemPlaceholder" />
</ul>
<div style="">
</div>
</LayoutTemplate>
</asp:ListView>
I can add any html formatting to this template e,g i can add ASP:button etc but i don't know how to trigger those to perform certain tasks.
One easy way to achieve your requirement is to keep those buttons there but invisible and show them up when the parent container is hovered. following as a quick sample
aspx
<asp:ListView ID="ListView1" runat="server">
<ItemTemplate>
<tr class="row-data">
<td>
<asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
</td>
<td>
<asp:Label ID="PositionLabel" runat="server" Text='<%# Eval("Position") %>' />
</td>
<td>
<div class="btn-area">
<asp:Button runat="server" Text="Button1" />
<asp:Button runat="server" Text="Button2" />
</div>
</td>
</tr>
</ItemTemplate>
<LayoutTemplate>
<table id="itemPlaceholderContainer" runat="server" border="0" style="">
<tr runat="server" style="">
<th runat="server">
Name
</th>
<th runat="server">
Position
</th>
<th>
</th>
</tr>
<tr id="itemPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>
</asp:ListView>
css
.btn-area
{
display: none;
}
.row-data:hover .btn-area
{
display: block;
}
code-behind
protected void Page_Load(object sender, EventArgs e)
{
ListView1.DataSource = new List<dynamic>() {
new { Name = "Andy", Position = "PG"},
new { Name = "Bill", Position = "SD"},
new { Name = "Caroline", Position = "Manager"}
};
ListView1.DataBind();
}
UPDATE
ListView ItemCommand can capture the postback by button pressed and CommandName makes you able to recognize which button fired it.
<asp:Button runat="server" Text="Button1" CommandName="c1" />
<asp:Button runat="server" Text="Button2" CommandName="c2" />
code-behind
protected void ListView1_ItemCommand(object sender, ListViewCommandEventArgs e)
{
if (e.CommandName == "c1")
{
// do something when button1 pressed
}
else if (e.CommandName == "c1")
{
// do something when button2 pressed
}
}

Find Controls nested inside Repeater Control

I'm trying to find the values of TextBoxes which are rendered in a Repeater though a UserControl, i.e. the Repeater has a Placeholder for the UserControl, and inside the UserControl is where the TextBox markup actually exists. I've done this before with TextBoxes directly inside of a Repeater before, which was fairly straight forward, and I'm wondering why this apparently can't be accomplished the same way. Here is the Default page with the Repeater, which contains a Placeholder...
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<form class="formee">
<fieldset>
<legend>Faculty Information</legend>
<div class="grid-4-12">
<asp:Label ID="lblFirstName1" runat="server" Text="First Name"></asp:Label>
<asp:Label ID="lblFirstName2" runat="server" Text="" ></asp:Label>
<asp:Label ID ="lblSalary" runat="server" Text="" ClientIDMode="Static"></asp:Label>
</div>
<div class="grid-6-12">
<asp:Label ID="lblLastName1" runat="server" Text="Last Name"></asp:Label>
<asp:Label ID="lblLastName2" runat="server" Text=""></asp:Label>
</div>
</fieldset>
</form>
<div id="repeaterDiv">
<asp:Repeater ID="rptBudget" runat="server" ClientIDMode="Static">
<ItemTemplate>
<asp:PlaceHolder ID="phBudget" runat="server" EnableViewState="true" />
<br />
</ItemTemplate>
</asp:Repeater>
<asp:Button ID="btnAddBudgetControl" runat="server" Text="Add"
CausesValidation="false" OnClick="AddBudgetControl" CssClass="addBudgetControl"/>
<asp:Button ID="btnDisplayEntries" runat="server" Text="Display Entries" CausesValidation="false" OnClick="DisplayEntries" />
</div>
<div>
<asp:TextBox ID="txtTotalPercent" runat="server" ClientIDMode="Static"></asp:TextBox>
<asp:TextBox ID="txtGrandTotal" runat="server" ClientIDMode="Static"></asp:TextBox>
<asp:Label ID="lblCtrls" runat="server" Text=""></asp:Label>
</div>
...and the UserControl which is inserted in the place of the Placeholder...
<fieldset>
<legend>Faculty Salary Form</legend>
<table cellspacing="10" id="values">
<tr>
<td>
<asp:Label ID="lblServiceType" runat="server" Text="Service"></asp:Label>
<asp:DropDownList runat="server" ID="ddlServiceType" CssClass="serviceType" />
</td>
<td>
<asp:Label ID="lblSpeedCode" runat="server" Text="Speed Code"></asp:Label>
<asp:DropDownList runat="server" ID="ddlSpeedCode" CssClass="speedType" />
</td>
<td>
<asp:Label ID="lblPercentage" runat="server" Text="Percentage"></asp:Label>
<asp:Textbox ID="txtPercentage" runat="server" CssClass="percentCommitment" ClientIDMode="Static" EnableViewState="true" />
</td>
<td>
<asp:Label ID="lblTotal" runat="server" Text="Total"></asp:Label>
<asp:TextBox ID="txtTotal" runat="server" CssClass="amountCommitment" ClientIDMode="Static" EnableViewState="true"/>
</td>
<td>
<asp:Button ID="btnRemove" runat="server" Text="Remove Item" OnClick="RemoveItem" ClientIDMode="Static" CssClass="btnRemove" />
</td>
</tr>
<tr>
</tr>
</table>
</fieldset>
...but when the following code runs for the Display button's OnClick, I always get a null value for any and all TextBoxes (and DropDowns) in the UserControl...
protected void DisplayEntries(object sender, EventArgs e)
{
foreach (RepeaterItem repeated in rptBudget.Items)
{
TextBox txtPercentage = (TextBox)repeated.FindControl("txtPercentage");
if (txtPercentage == null)
{
lblCtrls.Text += " null; ";
}
else
{
lblCtrls.Text += txtPercentage.Text + "; ";
}
}
}
What's the best way to access these values? Thanks.
txtPercentage Textbox is located inside Usercontrol, so use the following helper method to retrieve it.
Helper Method
public static Control FindControlRecursive(Control root, string id)
{
if (root.ID == id)
return root;
return root.Controls.Cast<Control>()
.Select(c => FindControlRecursive(c, id))
.FirstOrDefault(c => c != null);
}
Usage
foreach (RepeaterItem repeated in rptBudget.Items)
{
TextBox txtPercentage =
(TextBox)FindControlRecursive(repeated, "txtPercentage");
...
}
Try loading the placeholder first and then looking for the textboxes in the placeholder:
Something like this:
pseudo
var ph = repeated.FindControl("phBudget");
var txtBox = ph.FindControl("txtPercentage");
/pseudo
You need to first get the UserControl, then use FindControl on the UC itself.

Button Click Event is not firing but modalpopupextender is working

in my project
i have
<asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="Click" />
enter code here
Admin - *If Neccesery
<asp:ModalPopupExtender ID="ModalPopupExtender1" PopupControlID="Panel1" TargetControlID="btnAdd"
BackgroundCssClass="modalBackground" runat="server">
</asp:ModalPopupExtender>
<asp:Panel ID="Panel1" align="center" CssClass="modalPopup" runat="server">
<div class="body-reg-left">
<div class="body-top-reg">
<div class="he-reg">
<b>Admin </b>- *If Neccesery</div>
</div>
<table>
<tr>
<td>
<asp:Label ID="lblCategoryID" runat="server" Text="" CssClass="lbF"></asp:Label>
</td>
<td>
<asp:Label ID="lblstt" runat="server" Text=""></asp:Label>
</td>
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Brand Name" CssClass="lbF"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtbrdName" runat="server"></asp:TextBox>
</td>
</tr>
</tr>
<tr>
<td>
<asp:Button ID="BtnBrdName" runat="server" Text="Add" Width="70px" OnClick="Button1_Click" />
<asp:Button ID="btncancel" runat="server" Text="Cancel" OnClick="btncancel_Click" />
</td>
</tr>
</table>
</div>
</asp:Panel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
if i click the btnAdd the value inside category textbox should go to database and popup the window .... but in my project the btnADD button's click event is not firing and modalpopup is working.... please give me a solution..
I've had the same problem, for some reason when you set a button as the TargetControlID of the modal popup it disables the Click event.
The way I overcame this issue was by placing an invisible/dummy Label control on the page and setting the TargetControlID property of the modal to this Label.Then in your btnAdd Click event get all the necessary values from the db and simply call the ModalPopupExtender1.Show() to display the modal:
ASPX:
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="AddClick" />
<asp:Label ID="dummyLabel" runat="server" />
<asp:ModalPopupExtender ID="ModalPopupExtender1" PopupControlID="Panel1" TargetControlID="dummyLabel"
BackgroundCssClass="modalBackground" runat="server">
</asp:ModalPopupExtender>
<asp:Panel ID="Panel1" align="center" CssClass="modalPopup" runat="server">
<div class="body-reg-left">
<table>
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Brand Name" CssClass="lbF"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtbrdName" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Button ID="BtnBrdName" runat="server" Text="Add" Width="70px" OnClick="Add" />
<asp:Button ID="btncancel" runat="server" Text="Cancel" OnClick="Cancel" />
</td>
</tr>
</table>
</div>
</asp:Panel>
</div> </div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</form>
Code behind:
protected void Add(object sender, EventArgs e)
{
//Add logic
}
protected void Cancel(object sender, EventArgs e)
{
//Cancel logic
}
protected void AddClick(object sender, EventArgs e)
{
txtbrdName.Text = "Some category"; //Populate the value as required
ModalPopupExtender1.Show();
}

Adding two ajax modal popup in a single page

I encountered a problem where i add two ajax modal popup in a single page. This two modal popup each do different things. one is is create and one is for update. When two modal popup, my update button cannot be click ans execute the update codes. And when i remove my create modal popup, my updates work? Can anyone tell me how do i make two popup exist in the same page?
<!--Modal Popup: Create Topic-->
<cc1:modalpopupextender ID="ModalPopupExtender1" runat="server"
TargetControlID="btnShowPopup" PopupControlID="pnlCreatePopup"
CancelControlID="btnCancel" BackgroundCssClass="modalBackground">
</cc1:modalpopupextender>
<asp:Panel ID="pnlCreatePopup" runat="server" CssClass="createModalPopup">
<!--Modal Popup: Update Topic-->
<asp:Button ID="bnUpdateShow" runat="server" style="display:none;" />
<cc1:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="bnUpdateShow" PopupControlID="pnlpopup" CancelControlID="btnUpdateCancel" BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
<asp:Panel ID="pnlpopup" runat="server" CssClass="topicModalPopup">
I solved this hiding the ajax pop up inside a panel configured as visible=false. I fire the popUp in codeBehind. here is some code:
<asp:LinkButton runat="server" ID="lbCredits1" Font-Underline="true"
CausesValidation="false" OnClick="btMpeCredits_Click">Credits</asp:LinkButton>
|
<asp:LinkButton runat="server" ID="lbPrivacy2" Font-Underline="true"
CausesValidation="false" OnClick="btMpePrivacy_Click">Privacy</asp:LinkButton>
<%--AjaxPopUpExtenderArea--%>
<asp:Panel ID="pnlAjaxArea" runat="server" Visible="false">
<%--PrivacyMPE--%>
<%--I have to hide the link button referenced in the AjaxPopUpExtender. I will use a different button to show the pop up--%>
<div style="display:none;">
<asp:LinkButton runat="server" ID="lbPrivacy" Text="PRIVACY"/>
</div>
<asp:ModalPopupExtender ID="MpePrivacy" runat="server" TargetControlID="lbPrivacy"
PopupControlID="PnlPrivacy" BackgroundCssClass="modalBackground" >
</asp:ModalPopupExtender>
<asp:Panel runat="server" ID="PnlPrivacy" Height="500px" Width="600px" BorderStyle="Solid"
BorderColor="#1E549E" BorderWidth="3px" BackColor="#FFFFFF" ScrollBars="Auto">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<UcPrivacy:Privacy runat="server" ID="Privacy" />
</td>
</tr>
<tr>
<td align="center">
<asp:ImageButton ImageUrl="~/App_Themes/GfRegistrationPage/images/chiudi-btn.gif" runat="server" OnClick="btMpeClose"
CausesValidation="False" />
<br />
<br />
</td>
</tr>
</table>
</asp:Panel>
<%--CreditsMPE--%>
<div style="display:none;">
<asp:LinkButton runat="server" ID="lbCredits" Text="credits"/>
</div>
<asp:ModalPopupExtender ID="MpeCredits" runat="server" TargetControlID="lbCredits"
PopupControlID="PnlCredits" BackgroundCssClass="modalBackground" >
</asp:ModalPopupExtender>
<asp:Panel runat="server" ID="PnlCredits" Height="500px" Width="600px" BorderStyle="Solid"
BorderColor="#1E549E" BorderWidth="3px" BackColor="#FFFFFF" ScrollBars="Auto">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<UcCredits:Credits runat="server" ID="Credits" />
</td>
</tr>
<tr>
<td align="center">
<asp:ImageButton ImageUrl="~/App_Themes/GfRegistrationPage/images/chiudi-btn.gif" runat="server" OnClick="btMpeClose"
CausesValidation="False" />
<br />
<br />
</td>
</tr>
</table>
</asp:Panel>
</asp:Panel>
and here some code behind:
#region ModalPopUpS Privacy credits
protected void btMpePrivacy_Click(object sender, EventArgs e)
{
pnlAjaxArea.Visible = true;
AjaxControlToolkit.ModalPopupExtender modalPop = ((AjaxControlToolkit.ModalPopupExtender)(this.Master.FindControl("ContentPlaceHolder1").FindControl("MpePrivacy")));
modalPop.Show();
}
protected void btMpeCredits_Click(object sender, EventArgs e)
{
pnlAjaxArea.Visible = true;
AjaxControlToolkit.ModalPopupExtender modalPop = ((AjaxControlToolkit.ModalPopupExtender)(this.Master.FindControl("ContentPlaceHolder1").FindControl("MpeCredits")));
modalPop.Show();
}
protected void btMpeClose(object sender, EventArgs e)
{
pnlAjaxArea.Visible = false;
}
#endregion

Categories

Resources