• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2184
  • Last Modified:

refresh/reload an asp.net page from another page using c#

I have a main asp.net page that opens a pop up aspx page for searching.  

When the user searches they end up clicking on a row in a grid to select that record.

This fires a row command argument in the popup and from there jumps into a c# utility class which creates a javascript to handle closing the popup and passing back the searched for ID to the calling page.  See attached screens.

this is the main page they click spyglass to search
Search Popup
popup search
This is the rowcommand event after clicking select.
rowcommand event
Utility class used by several pages to handle pop up searches.  So its a method in there to handle closing the popup and sending back the id to the calling main page.
javascript block
Ok so after the popup window closes the ID ends up in the textbox on the main page.  
not sure how to reload page
What Ive done to this point is save off the ID in session so I can requery the page and load the appropriate record they wanted.  Trouble is Im not sure how to refresh the main page either
a.) via client script when the ID is copied to the textbox using jquery or javascript.
b.) Refreshing the main page from the popup page after the ID value is copied into the text box.  

I cant change the utility class javascript builder because its being used by several other pages.  

I just need to re-fire the submit or page load from the calling page after the Id value is searched on.  I have the right logic in the main page page_load to check for the ID in session and reload the searched for record.
1 Solution
hougie40Author Commented:
I was able to find a solution for this issue using javascript on the popup search page and bypassing the utility class.  Just did a location.href on the parent page after window.close.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now