Friendly Session Time out Message
<BODY onload=’beginSessionTimer();’> <script type=”text/javascript”> <!– function redirect(url) { window.location = url; } function ShowTimeoutWarning () { window.alert( “You will be logged out due to inactivity in 5 minutes. If you are working on something, please save your work now to prevent data loss!” ); } function beginSessionTimer() { // 30000ms = 30s // 300000ms = [...]
Debugging Classic ASP in VS08
1. Go to Control Panel>Administrative Tools>Computer Management. Add IWAM_ComputerName account to the Debugger Users group. 2. Create a Web Application Project in VS 2005 and add .asp files. 3. Create a virtual directory in IIS for the web application project that you created. 4. On the properties tab of the virtual directory in IIS do [...]
Return Inserted Identity from Stored Procedure
Stored Procedure looks like this: ALTER PROCEDURE [dbo].[spInsertSomething] @txtName varchar(255), @txtDisplayName varchar(80), @txtPhone varchar(50) AS BEGIN INSERT INTO tblSomeTable ( txtName , txtDisplayName , txtPhone ) VALUES ( @ txtName , @ txtDisplayName , @ txtPhone ) SELECT NEWID = SCOPE_IDENTITY() END