Home » 2011 » September

Archive for September, 2011

Increase session timeout

Increase session timeout web.config <configuration> <system.web> <sessionState timeout=”240″/> <!– increases session timeout from 20 minutes to 240 minutes, or 4 hours –> </system.web> </configuration> However, when increasing the user session timeout keep in mind the following: “The default is 10 minutes. Session.Timeout has no hard-coded limit. Most Web administrators set this property to 8 minutes. […]

Classic asp delete script

<% ‘define variables DIM objConn, objRS ‘connection DIM i_last, count, bgcolor ‘even row bg color Dim job, recID ‘fetching query strings job = Request.QueryString(“do”) recID = Request.QueryString(“rid”) Dim sqlstatement ‘ sql query command string If job = “del” Then SET objConn = Server.CreateObject(“ADODB.Connection”) objConn.ConnectionTimeOut = 30 objConn.Open “DSN=MySystemDSN” sqlstatement = “DELETE FROM Customers WHERE ID=” […]

VB.NET – Update record in code behind

Default.aspx Project Status: Open In process On hold Closed <asp:DropDownList ID=”UpdateStatus” runat=”server”> <asp:ListItem Text=”Open” Value=”Open”> <asp:ListItem Text=”In process” Value=”In process”> <asp:ListItem Text=”On hold” Value=”On hold”> <asp:ListItem Text=”Closed” Value=”Closed”> </asp:DropDownList> <asp:Button ID=”UpdateBtn” runat=”server” Text=”Update” /> Default.vb.aspx Imports System.Web.UI.WebControls.DropDownList Protected Sub UpdateBtn_Click(sender As Object, e As System.EventArgs) _ Handles UpdateBtn.Click ‘ – query identifier Dim pid As […]