Hello,
You can use several approaches:
You can use simply our Lightbox web part and insert your control code the following way into the transformation (Selected item transformation):
<%@ Register Src="~/CMSWebParts/Text/statictext.ascx" TagName="statictext" TagPrefix="uc1" %>
<uc1:statictext ID="StaticText1" runat="server" Text="Static text inserted using Static text webpart." EnableViewState="false" />
You can test this on a sample site in the section Examples / Web parts / Listings and viewers / Light box.
Or you can create javascript method from scratch as described
here.
The last approach which comes to my mind is to create a new OnClick event on a button which would bring up the desired page with your code:
Button1.Attributes.Add("OnClick", "window.open('CoustomForm.aspx',null,'Height=300;left=100;Width=300;top=100;menubar=no;toolbar=no;scrollbars=yes');");
Best regards,
Boris Pocatko