C# .NET - ModalPopupExtender from code behind

Asked By Raymond Kelly on 10-Nov-09 02:27 PM

I have a ModalPopupExtender on my default page with a TargetControlID of btnShowPanel.  This asp:Button (btnShowPanel) is on my default page and everything is set up so, when I click it, the Modal box pops up, as expected.

What I would like to do is have this Modal box pop up programatically from my C# code behind.

Any thoughts would be helpful.

I'm new to AJAX, so be gentle.

Ray

Re

Ravenet Rasaiyah replied to Raymond Kelly on 10-Nov-09 08:12 PM
Hi

Yes you can show when you are button click ,


protected void btnEditText_Click(object sender, EventArgs e)
{
InitDialog();
ModalPanel1.Update();
ModalPopupExtender1.Show();
}

more http://msdn.microsoft.com/en-us/magazine/cc164247.aspx

thank you