I have a user table & I want whenever a user orders a product, its order should be saved in order table with user primary key, so what relationship I have to add in user and order table. please let me know
Suppose, this is my ActionMethod
public ActionResult Create( Student student)
{
if (ModelState.IsValid)
{
db.Students.Add(student);
db.SaveChanges();
return RedirectToAction("Index");
}
return View(student);
}
Database Relationship image
...
Hi, I wanted to stay open pop-up modal (this modal is partial view) after successfully inserting data in database, I am using Ajax.BeginForm to save data with PartialView
I want to stay it open so I can insert new data without clicking the create button again and i dont want to redirect it to Index View. Please see the image below of my code, Thanks...
...
I am using partial in pop-up modal, and I wanted to do a server validation but I want the modal will stay, is it possible without reloading?
I am using "Ajax.BeginForm". Thanks
...I want to export data to excel using asp.net boilerplate MVC, How can I achieve it? I want a working demo(if possible)?
thank you very much!
...I am calculating distance between two Latitude and long
one is the current location of the user and another from the database, I want here if the lat-long distance is between 4km then show data
how can I do it using C#?
...In asp.net MVC, How can I send value from model in view to javascript file?
...I would like to know difference between
in asp.net MVC, when we should use which HTML helper method?
Thanks
...I want ebook or demo of asp.net boilerplate but do not paste home page(https://aspnetboilerplate.com/) of boilerplate.
thank you very much!!
...How can I simplify the url to http://localhost:51675/Prescriptions/Create/12 instead of http://localhost:51675/Prescriptions/Create?AssessmentID=12.
currently i am using this code
how can I disable browser back-forward button after logging out from asp.net MVC C# web application, I have tried this javascript code
...