Avatar of Steve Hougom
Steve HougomFlag for United States of America asked on

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.

Avatar of undefined
Last Comment
Steve Hougom

8/22/2022 - Mon
Steve Hougom

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes