USE [MobileNotes]GO/****** Object: Table [dbo].[Notes] Script Date: 6/2/2014 2:50:38 PM ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TABLE [dbo].[Notes]( [SN] [int] IDENTITY(1,1) NOT NULL, [Title] [nvarchar](max) NULL, [Date] [date] NULL, [NoteTime] [nvarchar](20) NULL, [Status] [nvarchar](20) NULL, CONSTRAINT [PK_Table_1] PRIMARY KEY CLUSTERED ( [SN] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]GO
I have to play a sound on on date and NoteTime which is stored in my database..
Index (View Page):-
<p><source src="@Url.Action("myaudio")" type="audio/mp3" /></p>
Controller:-
public ActionResult Index()
{
var file = Server.MapPath("~/app_data/ipl.mp3");
return File(file, "audio/mp3"); // I am unable to call two return in one view.
return View(db.Notes.ToList()); // list of record from my database..
}
· Individually works both but audio is not playing on date and time accroding to database because I don’t know how to do. it play on page load when we not return
return View(db.Notes.ToList());
· I want to show Title from my database on date and time with audio.