Calling Pop Up Window

C

chris

I tried to open a form in a new window (pop up).

PROBLEM1:

CASE 1: Defined from design the OnClientClick =
window.showModalDialog('Report.aspx')
The problem was that new window needs values from session variables
which get their values from button save (which is executed after the
OnClientClick property).

CASE 2: Set OnClientClick from button save. Problem is that button
needs to be clicked twice for opening new window.

Protected Sub btn_save_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btn_save.Click
Session("one_all") = 2
Session("period_type_no") = dropdownlist.SelectedValue
btn_edit_report.OnClientClick = "window.showModalDialog('Report.aspx')"
refresh_gridview_data()

PROBLEM2:
On Pop up window CLOSE button, design properties, assigned
OnClientClick = Window.Close()

When I click close button, current popup window closes but opens the
same (second) window again.

Is there another solution, for passing sessions values and opening new
window for a form.

Thanks a lot.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top