inserting record through pop window question and then forcing refresh

  • Thread starter Patrick Olurotimi Ige
  • Start date
P

Patrick Olurotimi Ige

I have a webform with DropDownLists and
and i would like to have a link that would open up a window popup for
the USER to
insert some data into the Database and then on closing the popub window
or clicking the save button i would like to force the main page to
refresh so that the Data would show in the Dropdwon list i want to
insert the Data to
Any ideas?
 
G

Guest

Hi Pat
Here is the Code which does that.
Assuming that you have completed the code for loading the data into the
DropDownList.
In the PopupWindow here is the algorithm to follow
if (isPostBack)
{
<Your Asp.Net code to insert the Record>
Response.Write "<script>window.opener.location.href='<aspxpage>';</script>");
Response.Write ("<script>window.close();</script>");
}
From the above code current window will be closed and the parent page will
be refreshed and teh data will be loaded into the dropdown list.
I have complete set of code for reference. But I hope the above example does
the thing for you.

Thanks
 
P

Prodip Saha

Patrick- Looks like you will need to implement some javascripts. Have a look at this article on how to work with modal pop up windows- http://www.codeproject.com/aspnet/Modal_Dialog.asp?print=true

You can modify the scripts in the parent window to refresh after returning from child window.

Thanks,
Prodip
www.aspnet4you.com

I have a webform with DropDownLists and
and i would like to have a link that would open up a window popup for
the USER to
insert some data into the Database and then on closing the popub window
or clicking the save button i would like to force the main page to
refresh so that the Data would show in the Dropdwon list i want to
insert the Data to
Any ideas?
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top