Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I have two pages
1) Add Records
2) New Registration

I want to Refresh the New Registration page only once when am redirecting the page in asp.net.
am redirecting the url from add records page.

This is my Code.

ScriptManager.RegisterStartupScript(this, this.GetType(), "RunCode", "javascript:alert(' Application Submitted Successfully');window.close(),document.location.href="/KB/answers/NewRegistration.aspx";", true);

I want to Refresh NewRegistration Page after Redirecting.

Please help, thanks
Posted
Comments
thatraja 16-Dec-13 5:21am    
Redirecting from where?

1 solution

Hi,
It seems from your code, you are closing the window and expecting other window to open the "NewRegistration.aspx" page.

You dont have to refresh your page as the page is loading for the first time. here your remove the window.close and check what you required is working fine.

ScriptManager.RegisterStartupScript(this, this.GetType(), "RunCode", "javascript:alert(' Application Submitted Successfully');document.location.href="/KB/answers/NewRegistration.aspx";", true);

Hope you get what you want

Regards,
Prasath S J
 
Share this answer
 
Comments
Member239258 16-Dec-13 5:47am    
ya, i want to close that window and redirect to another page.

The NewRegistration.aspx must be refreshed after redirection.

Please help.

Thanks.
Prasaad SJ 16-Dec-13 6:10am    
Sorry.. I could n't get you. Can you explain in detail.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900