Click here to Skip to main content
15,880,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one modalpopup extender..i have 2 link button in gridview bt i want to call same modalpopup on both link button only one change there like i want show different data on both from same extender and can we use 2 panel in one modalpopup extender?and can we show and hide those panel?and can we call 2 modalpopup at same time on one button click?.plz help me?
Posted
Updated 4-Jan-13 0:10am
v4

hi,
a) On button click first hide modal popup
b) Change target control id of modal popup
c) show modal popup.
 
Share this answer
 
You can show your popup using javascript. Try this:
Javascript:
JavaScript
function fnShowPopup(sender) {
    var popup = document.getElementById('ModelPopup1');
    if (sender.id == "Button1") {
        popup.show();
        //Put your changes for first button click
    }
    else {
        popup.show();
        //Put your changes for second button click
    }
}

HTML:
ASP.NET
<asp:button id="Button1" runat="server" autopostback="false" onclick="fnShowPopup(this)" xmlns:asp="#unknown" />
<asp:button id="Button2" runat="server" autopostback="false" onclick="fnShowPopup(this)" xmlns:asp="#unknown" />



--Amit
 
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