hi am developing a online test application
i need to fix up a time for the test and redirect to result page as soon as the test is over
how can i do this
i think we need to set up a session timeout property
can anyone clearly explain me how to do this with the code

Regards
shruthi

Recommended Answers

All 8 Replies

Of the top of my head what I'd do is have a main page with an iFrame in it and a javascript timer function. Run the test in the iFrame so the timer in the main page is uninterrupted. When the timer expires make it set the iFrames src address to the results page.

Hey .....
Use <sessionState timeout="10000"/> tag for session timeout Property
important : Remeber 10000 in seconds....


Use Session_End Event which is available in Global.asax file.....

Hey .....

Use <sessionState timeout="10000"/> tag for session timeout Property
important : Remeber 10000 in seconds....


Use Session_End Event which is available in Global.asax file.....

I would argue session timeout is not a good candidate for this particular problem.

ASP.NET is a framework based on a connectionless protocol. You can't 'push' things to the client. When the session state times out the server can't tell the client it's time is up and force it to POST it's answers. Session_End is also tricky to use in a reliable way.

hey use the following code in the web.config file in u r application

<session timeount="10000" />
Where 10000 in minutes......

hey use the following code in the web.config file in u r application

<session timeount="10000" />
Where 10000 in minutes......

Not only did you change units between your posts (from seconds to minutes), but you blatantly ignored the post describing why this method would be ineffective. :icon_rolleyes:

Hey use this meta tag after the title tag in your
.aspx page

<meta http-equiv = "Refresh" content = "5" />

It will refresh automatically after some seconds that u mentioned in content property of the meta tag...

While refreshing u can identify using Page.IsPostBack Property ...
and u can redirect to some other page Where the results to be shown

to change session timeout write this code in your web.config
file

<sessionState mode="InProc" timeout="60">

or you can also set this in global.asax file as

Session.Timeout = 60 ; // in Session.Start() event

it will increase your session expire time .

<sessionState mode="InProc"
timeout="20"/>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.