Creating Pop-up Window from ASP.Net Table Cell
Hi, all.
I have an ASP.NET table with url links to other ASP.NET forms. I would like these forms (in the url links) to be pop-up windows that "sit on top of" the parent form (the form with the ASP.NET table).
I have the following code in my code behind module for those rows/columns in my table that have links to other forms:
Dim expCol2 As New TableCell
Dim explc As New LiteralControl
explc.Text = "Successful teaching experience in the subject within the last 5 years."
expCol2 = tblHOUSSE.Rows.Item(1).Cells(1)
expCol2.Controls.Add(explc)
Dim exph As New HyperLink
exph.Text = "Teacher Subject Experience Detail"
exph.NavigateUrl = "TchrSubjExpDetail.aspx"
expCol2.Controls.Add(exph)
I have created pop-up ASP.NET forms in the past, but don't know how to do it from a table cell. What I did before was put the following code in an event handler:
Dim popupScript As String = "<script language='javascript'>" & _
"myCalendar = window.open('AddrCalendar.aspx', 'MyAddress', " & _
"'width=315, height=370, menubar=no, resizable=no, fullscreen=0, modal=yes, TopMost=True, MyCalendar.focus();')" & _
"</script>"
' Register the script
Page.RegisterStartupScript("CalPopUpJS", popupScript)
In case anyone is wondering, I used an ASP.NET table on my ASP.NET page because nearly all the info on the page is static text.
Thank you,
Sue
|