Home » Archive by category "Applications" (Page 21)

Archive for the 'Applications' Category

VB.NET – Send Email

Send email using web form – user defines smtp settings. send-email.aspx To: From: SMTP Server: Subject: Attachment: Body: You email body here Action: Status: [labelEmailSent] send-email.aspx.vb Imports System.Net.Mail Partial Class Send_Email Inherits System.Web.UI.Page Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click Try Dim SendFrom As MailAddress = New MailAddress(txtFrom.Text) Dim SendTo […]

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. […]

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 […]