I am working with mvc i need to display data from database as a labels in front end could you plz help me to display
I can show the the data in application in itself,look the code
this is my model(properties)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace MvcBugTracker.Models
{
public class ViewBugModels
{
public static List<ViewBugModels> ViewBugsList { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public static List<ViewBugModels> ViewProjects { get; set; }
public Int16 ProjectId { get; set; }
public string projectName { get; set; }
public string status { get; set; }
public static List<ViewBugModels> ViewCategory { get; set; }
public Int16 CategoryID { get; set; }
public string Category { get; set; }
public string Version { get; set; }
public string BuildNumber { get; set; }
public static List<ViewBugModels> ViewReleasePhase { get; set; }
public int ReleasePhaseID { get; set; }
public string ReleasePhase { get; set; }
public static List<ViewBugModels> ViewPrirority { get; set; }
public string Prirority { get; set; }
public Int16 PriorityID { get; set; }
public static List<ViewBugModels> ViewSeverity { get; set; }
public int SeverityID { get; set; }
public string Severity { get; set; }
public static List<ViewBugModels> ViewType { get; set; }
public int TypeID { get; set; }
public string Type { get; set; }
public static List<ViewBugModels> UpdateBugList { get; set; }
public int BugHistoryID { get; set; }
public int BugID { get; set; }
public int FixedByID { get; set; }
public int AssignedTo { get; set; }
public string Resolution { get; set; }
public string FromStatus { get; set; }
public string ToStatus { get; set; }
}
}
this is my controller
namespace MvcBugTracker.Controllers
{
public class ViewBugssController : Controller
{
public ActionResult ViewBugDeta()
{
MvcBugTracker.Models.ViewBugModels Details = new MvcBugTracker.Models.ViewBugModels();
Details.Title = "Title";
Details.Description = "Description";
Details.Version = "new version";
return View(Details);
}
and this my aspx page
<html>
<head runat="server">
<title>ViewBugDeta</title>
</head>
<body>
<fieldset style=" border: 1px solid #CCCCCC; margin: 1px 0 0 10px; padding: 1em; width: 400px;">
<legend >ViewBugDeta</legend>
<div class="lable_main">
<div class="title">
<div class="title_text" >
Title<%=Model.Title %>
</div>
<div class="title_text" >
Description<%=Model.Description %>
</div>
</div>
</div>
<div class="project_main">
<div class="title_text" >
Version<%=Model.Version %>
</div>
</div>
</fieldset>
</body>
</html>
it is displaying the the details as labels bu i need to display it from database
so i need to get Title,and description ,Version from database and need to show as labels plz help me to show the data as labels from database
Thankyou in advance