i have two asp page,first one is home and second one is test. In home page user can select the type of test they want to take up, and after pressing start button a new window is open for taking the test. What i want to achieve is , after pleting the test i want to close the test window and redirect to another page, and this redirect should hit the previously opened home window.
i have two asp page,first one is home and second one is test. In home page user can select the type of test they want to take up, and after pressing start button a new window is open for taking the test. What i want to achieve is , after pleting the test i want to close the test window and redirect to another page, and this redirect should hit the previously opened home window.
Share Improve this question asked Oct 5, 2013 at 10:48 NiarNiar 5402 gold badges11 silver badges25 bronze badges3 Answers
Reset to default 4You don't clarify that you have popup window or blank window i am aspecting for the popup In submit click button press
String x = "<script type='text/javascript'>window.opener.location.href='**Your new url of new page after pleting test**';self.close();</script>";
ScriptManager.RegisterClientScriptBlock(this.Page,this.Page.GetType(), "script", x,false);
From self close you will be able to close current window and by window.opener.location.href you will able to redirect to new url I hope this will help you
regards....:)
Yes you can do these 2 ways:
Window.Open() /.showmodalDialog() and keep parent and child open as well, or
On the home page click on your start button. Use code
Response.Redirect("~/Test.aspx");
assuming it resides withHome.aspx
. Take your test usingASp.Net wizard control
orhiddens divs
what ever suits you easy. Manipulate data on test page , save and get result to and from database using SqlConnection and SqlCommand assuming you haveSql Server
as backend. Hold the table or any value in either cache or Session and throw it on your home page. Do whatever you want.
This will be not possible. What you can do is to redirect the user to the home page after pleting the test, but this will be in the same windows.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744903482a4600116.html
评论列表(0条)