targetcontrolid="btnAdd" popupcontrolid="Panel1"
popupdraghandlecontrolid="PopupHeader" drag="true"
>
targetcontrolid="btnAdd" popupcontrolid="Panel2"
popupdraghandlecontrolid="PopupHeader" drag="true"
>
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit ChoudharyPosted Oct 14, 2010, 9:44 AM
add and hidden button on your page and set the targetcontrolID="btn_hidden" for both modal popup.
now in your code behind you can now use the code
if(
{
modalpopupcontorl1.show();
}
else
{
modalpopupcontrol2.show();
}
Please mark "Do you like this post?" if it helps you
Vikas AhlawatPosted Oct 15, 2010, 6:12 AM
if (buttonstring == "Category")
{
ModalPopupExtender1.CancelControlID = "ctgcancelcross";
ModalPopupExtender1.PopupControlID = "Panel_Category";
}
else if (buttonstring == "StudentProspects")
{
ModalPopupExtender1.CancelControlID = "spcancelcross";
ModalPopupExtender1.PopupControlID = "Panel_StudentProspects";
}
Amit ChoudharyPosted Oct 15, 2010, 4:27 AM
Vikas AhlawatPosted Oct 15, 2010, 12:03 AM
I have set targetcontrolid="btnAdd" for both modelpopup
and write the code on btnAdd click event
if (buttonstring == "Category")
{
ModalPopupExtender2.Show();
}
else
{
ModalPopupExtender1.Show();
}
but it show both modal popup
Posted Oct 14, 2010, 7:34 AM
https://blogs.blackmarble.co.uk/blogs/rfennell/archive/2008/09/02/controlling-a-ajax-control-modalpopupextender-from-code-behind.aspx