– Login to your server MS SQL Management Studio Express – Expand the database; expand the tables folder, right click on the table “[your table name]”, click “Open Table.” Make sure the primary key column(s) have been declared to not contain NULL values (when the table was first created). With the open table click on […]
Archive for the 'ASP.NET' Category
Month, day and year code behind format
Day name and date format of Friday, 11/11/2011 Dim strDayName As String Dim curTime As New DateTime curTime = DateTime.Now.ToShortDateString() strDayName = curTime.DayOfWeek.ToString Response.Write(strDayName & “, ” & DateTime.Today) Result: Friday, 11/11/2011 Day name and date format of Friday, 11/11/2011 using case funtion Dim iDay As String Dim strDayName As String iDay = DatePart(“w”, DateTime.Now) […]
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 […]