Click here to Skip to main content
15,887,027 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionWhich one is the best generic or concrete repository & why ? Pin
Dinesh Singh Kushwaha (Dev)6-Apr-18 23:31
Dinesh Singh Kushwaha (Dev)6-Apr-18 23:31 
AnswerRe: Which one is the best generic or concrete repository & why ? Pin
Richard MacCutchan7-Apr-18 3:11
mveRichard MacCutchan7-Apr-18 3:11 
Questionaction request that doesn't match route attr, catch and redirect to error page Pin
jkirkerx5-Apr-18 9:41
professionaljkirkerx5-Apr-18 9:41 
AnswerWhen route constraints fail [solved] Pin
jkirkerx5-Apr-18 9:57
professionaljkirkerx5-Apr-18 9:57 
Questionwhat is Uniform Interface in REST Pin
Mou_kol5-Apr-18 2:55
Mou_kol5-Apr-18 2:55 
QuestionAsp.Net MVC Pin
Ankit Bopche28-Mar-18 5:42
Ankit Bopche28-Mar-18 5:42 
AnswerRe: Asp.Net MVC Pin
Richard Deeming28-Mar-18 8:01
mveRichard Deeming28-Mar-18 8:01 
GeneralRe: Asp.Net MVC Pin
Ankit Bopche28-Mar-18 8:25
Ankit Bopche28-Mar-18 8:25 
Hello sir am attaching my homeController code to this file check it and let me know where should i make the changes and how at_least give me code_snippet for making changes into my code instead.

//HomeController

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TestMvcApplication.Models;

namespace TestMvcApplication.Controllers
{
public class HomeController : Controller
{

// GET: Home
public ActionResult Index()
{
return View();
}

// get regester
public ActionResult Register()
{
return View();
}

public ActionResult Login()
{
return View();
}


[HttpPost]
public ActionResult Register(tblEmployee obj)
{
if (ModelState.IsValid)
{
MYDBEntities1 db = new MYDBEntities1();
db.tblEmployees.Add(obj);
db.SaveChanges();

}

return View(obj);
}
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Login(UserProfile objUser)
{
if (ModelState.IsValid)
{
using (MYDBEntities1 db = new MYDBEntities1())
{
var obj = db.UserProfiles.Where(a => a.UserName.Equals(objUser.UserName) && a.Password.Equals(objUser.Password)).FirstOrDefault();
if (obj != null)
{
Session["UserID"] = obj.UserId.ToString();
Session["UserName"] = obj.UserName.ToString();
return RedirectToAction("Register");
}
}

}

return View(objUser);
}
[HttpGet]
public ActionResult Edit(int id)
{
return View();
}
GeneralRe: Asp.Net MVC Pin
Ankit Bopche28-Mar-18 8:34
Ankit Bopche28-Mar-18 8:34 
GeneralRe: Asp.Net MVC Pin
Richard Deeming28-Mar-18 9:05
mveRichard Deeming28-Mar-18 9:05 
QuestionEnable Image Zoom only Pin
sunsher28-Mar-18 3:24
sunsher28-Mar-18 3:24 
AnswerRe: Enable Image Zoom only Pin
User 418025431-Mar-18 15:20
User 418025431-Mar-18 15:20 
QuestionHttpCookie vs Cookie, and multi-value HttpCookie Pin
jkirkerx25-Mar-18 12:55
professionaljkirkerx25-Mar-18 12:55 
AnswerRe: HttpCookie vs Cookie, and multi-value HttpCookie Pin
Richard Deeming26-Mar-18 8:37
mveRichard Deeming26-Mar-18 8:37 
GeneralRe: HttpCookie vs Cookie, and multi-value HttpCookie Pin
jkirkerx5-Apr-18 12:24
professionaljkirkerx5-Apr-18 12:24 
QuestionNeed to loop through Kendo grid to get the selected value of all the Dropdowns in the Grid Pin
indian14320-Mar-18 14:09
indian14320-Mar-18 14:09 
AnswerRe: Need to loop through Kendo grid to get the selected value of all the Dropdowns in the Grid Pin
Vincent Maverick Durano20-Mar-18 17:40
professionalVincent Maverick Durano20-Mar-18 17:40 
GeneralRe: Need to loop through Kendo grid to get the selected value of all the Dropdowns in the Grid Pin
indian14320-Mar-18 20:44
indian14320-Mar-18 20:44 
GeneralRe: Need to loop through Kendo grid to get the selected value of all the Dropdowns in the Grid Pin
Richard Deeming21-Mar-18 9:24
mveRichard Deeming21-Mar-18 9:24 
GeneralRe: Need to loop through Kendo grid to get the selected value of all the Dropdowns in the Grid Pin
indian14321-Mar-18 10:07
indian14321-Mar-18 10:07 
GeneralRe: Need to loop through Kendo grid to get the selected value of all the Dropdowns in the Grid Pin
indian14321-Mar-18 7:29
indian14321-Mar-18 7:29 
Questionhow to find a running total in a gridView templateField Pin
Member 933127820-Mar-18 12:40
Member 933127820-Mar-18 12:40 
AnswerRe: how to find a running total in a gridView templateField Pin
Vincent Maverick Durano20-Mar-18 17:35
professionalVincent Maverick Durano20-Mar-18 17:35 
QuestionPage.RegisterStartupScript Method Pin
A_Griffin16-Mar-18 2:23
A_Griffin16-Mar-18 2:23 
AnswerRe: Page.RegisterStartupScript Method Pin
Richard Deeming16-Mar-18 2:46
mveRichard Deeming16-Mar-18 2:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.