Click here to Skip to main content
15,890,438 members
Everything / Model

Model

model

Great Reads

by Ehsan.MA
Consider rigid body
by Mostafa Asaduzzaman
How to create a quick pie graph using MVC Model and CanvasJS
by Abhishek Kumar Goswami
This helps to make a visible date field in Chrome native datepicker while it will bind from the Model in ASP.NET MVC 4.
by coded007
A word about Unified Dimensional Model we use in analysis services.

Latest Articles

by Ujwal Watgule
Credit card fraud detection is an important application of machine learning techniques.
by Pete O'Hanlon
How to use arrays to manage multiple items
by Pete O'Hanlon
What is an array and how to use it to manage multiple items
by Uladzislau Baryshchyk
This series of articles consists of three articles, in which I will demonstrate step by step how to create a .NET core MVC project

All Articles

Sort by Updated

Model 

16 Dec 2014 by #realJSOP
Eliminate the tedium of generating model and viewmodel classes for your WPF projects, and save a butt-load of time in the process.
1 Apr 2018 by #realJSOP
Find a hex editor, open the file with it, and see if you can determine how it's laid out.Chances are few if any of us play the game, so we don't have an example of the file to do it for you.
26 Jun 2020 by #realJSOP
attemping to deserialize Jason to a model object will throw an exception if thedesrialization can’t be performed. Why can’t you just put a try/catch block around the deserialization code and let nature take its course?
5 Nov 2021 by #realJSOP
One way to allow access to multiple model entities within a ASP.NET MVC view.
8 Nov 2012 by -Dr_X-
In you web.config, increase the maxRequestLength.
14 Apr 2016 by _ProgProg_
Dears,I want to do some weird job which is: adding attributes dynamically to my model class without adding these attributes directly on each property in the model class.the whole story is:I have an MVC project using Code first with domain driven design so i have the following:Core...
30 Dec 2013 by Aaditya parcha
Hi,i have a student class like belowpublic class Student { public int stdId { set; get; } public string stdName { get; set; } public string dept { get; set; } }and my controller code is public ActionResult Student() { ...
26 Jan 2015 by Abhinav S
This could be because you are connecting to a different database in Production and this could be returning wrong / unexpected values while running the code.
12 Apr 2015 by Abhinav S
This article discusses many approaches to do this - Multiple Models in a View in ASP.NET MVC 4 / MVC 5[^].Multiple Models in Single View in MVC[^] will also help you.
1 May 2013 by Abhishek Kumar Goswami
This helps to make a visible date field in Chrome native datepicker while it will bind from the Model in ASP.NET MVC 4.
14 May 2015 by Afzaal Ahmad Zeeshan
All of the engines allow you to add your own custom textures and models. That is their job to allow you to create your own models, add different texturing and shading to them. I have tried 2 3D modeling tools (Maya and Unity 3D). I have loved Maya because it lets me create models using...
1 Jun 2015 by Afzaal Ahmad Zeeshan
If you created the file yourself, you forgot to close the stream. If Visual Studio is using it, restart your system there are a lot of underground processes that might be using the files, and even in Task Manager you would have no idea which of the process is using it. (I have no idea of doing...
3 Mar 2016 by Alaa Ben Fatma
You could use "\t", I think, to give you a tab character. That might make the spacing more clear.storeModel.PriceSeparator = @"\t";
20 Sep 2013 by alimohammad2011
Greeting for the day !!Dear friends I am stuck on a solution i need to provide to my clients. Describing the requirement in detail so please don't mind the length of this post.I am supposed to develop an offline model for my asp.net (4.5) web application along with SQL server as db on...
12 Apr 2015 by Am Gayathri
How do i use two model in one view in MVC4? I want to use two different models in my form.One is for registration another for login. I want to use both models in my main view. I added one model that contains two other model for registration and login. but am unable to fetch the values in...
14 Apr 2015 by Am Gayathri
I have one view and that view contains create user and login forms. For both i have different models. When user clicks on Register button i will pass register model values and for login click i pass login model values.I have added some validation in model also (You can see it my code...
29 Oct 2012 by batuhan karaduman
Hello,Can you help me, how to use multiple model in one mvc view?for example i have two classes called Projects, meetings. i want to show them in one view "Here is my projects...." and "here is my meetings" but i have an error like this;"The model item passed into the dictionary is...
26 Jun 2014 by Bhanu Pratap Verma
Dear All,I want to display a popup message when user place the mouse on a date in the calender control.Popup is showing but is blinking very fast.Massage having hyperlink which redirect to other page.Please help me ASAP.Aspx Code:
13 Apr 2020 by Bohdan Stupak
You've confused it with System.Web.HttpUtility.HtmlEncode which will escape single quote.
31 Jan 2016 by Brady Kelly
I have `User` table in a PowerDesigner logical model, which inherits from a base entity that has `Id` as 'int`. I need to change this to `string`. I can't change the base entity's id type, as only one table must change. So I would like to simply remove this table's parent inheritance, and let it...
24 Jul 2014 by brknlpr
hello everybody I am trying to get data when one of my dropdown selected index change here are my codes I couldn't get where am ı missing or doing something wrong I am very glad if you help me thank you .this is my script code$("#ddOrder").change(function (e) { alert =...
12 Aug 2020 by Bullgill Coder
Hi I am trying to get the address values from a simple post request to an API so I can read them an populate a SQL table. Items such as name etc I am able to read and write to the database, but each person has 2 addresses so these are in the json...
19 Jul 2012 by C Is Sharp
An overview of implementing MVC in PHP.
31 Jul 2020 by charal
The files .a3d are for modeling and I do not know how to create them. What I have tried: I found that an A3D file created in Maya and translated from a Collada file. Nothing else.
10 Nov 2013 by Christian Graus
Throw all this out and use Entity Framework instead. That makes it even easier to write code to search your database.
23 Sep 2013 by coded007
A word about Unified Dimensional Model we use in analysis services.
27 Dec 2023 by codiagirl
I have a child view name UploadImage and parent view name CROCOnfig, when I access child view by using button in parent view,it works fine, but when I try to render child view in parent view,it throws error that model is null. I have placed child...
1 Mar 2017 by Dave Clemmer
Exploring ways to make direct use of model structures and data to powerfully augment software development with a model oriented approach.
30 Sep 2014 by Dave Clemmer
Applying a day's worth of model oriented work to greatly improve the quality and quantity of unit tests for the nopCommerce open source e-commerce solution.
8 Mar 2017 by Dave Clemmer
Considering the various qualities that a model oriented programming language should have for effective model oriented development.
19 Feb 2017 by Dave Clemmer
Identifying some model oriented techniques you already use and put those techniques into context of overall model oriented techniques that you can tap into.
12 May 2016 by Dave Kreskowiak
There's really nothing to help with. It comes down to you reading up on SQL Server security and understanding how it works and how to set it up. There is no way you're going to have someone just give you a blurb in a forum post and it'll magically work.The error is pretty clear. The SQL...
1 Mar 2023 by Dave Kreskowiak
Is there a programming question in there somewhere? Writing code is what this site is all about, not doing motion capture.
12 May 2016 by Deepak Kanswal Sharma
I'm New to MVC Application . My problem is while I'm trying to connect to Sql Server2008 . This is giving me the error :- Cannot open database "rsbenggmvc.Models.RsbEnggContext" requested by the login. The login failed.Login failed for user 'DEEPAK-PC\DEEPAK'.Project Name :-...
29 Aug 2012 by deurebokkn
I'm writing a program and I could use some inspiration with the classes.The pattern is already in place (using mvp because they want to expand to both website and phone in about a year). With a data and a business layer.Background informationBut it's about making trailers for trucks.So...
30 Apr 2014 by Dineshbabu.C
I may be asking a question that a lot of programmers might have asked but still here it goes..I have the a model User with following properties public string firstName { get; set; } public string lastName { get; set; } public string userName { get; set; } public int...
11 Jun 2012 by Dirk Bahle
Sample WPF value and multivalue converters for entering unit based values.
1 Jan 2014 by Dominic Abraham
HiI made a small change in your source. Please check. public class StudentController : Controller { // // GET: /Student/ public ActionResult Student() { StudentList stdlist = new StudentList(); List lstStd =...
22 May 2015 by Duncan Edwards Jones
I am building a DSL using the Visual Studio modelling SDK and one of my model classes needs to have a domain property that I want to just be one of a selection of items from a drop-down list.(I can't override a Microsoft.VisualStudio.Modeling.ElementNameProvider class, as this property is...
27 May 2015 by Duncan Edwards Jones
It turns out that if you right-click the top level item in the DSL Explorer there is a menu "Add New Domain Enumeration" that fires a builder to help you build a new enumerated type that is known to the model and can therefore be used for domain properties.
26 Jan 2015 by E.F. Nijboer
Sounds like the old "Works on my machine" problem. Check the database of both production and your development (test/acceptance?) machines. Look at validations that could easily break due to cultural differences like dates for example. Check machine language and culture settings and make sure...
29 Nov 2018 by Ehsan.MA
Consider rigid body
13 Sep 2015 by F-ES Sitecore
You can use the FormCollection to process the post dynamicallyGetting Data From View to Controller in MVC[^]
27 Oct 2015 by F-ES Sitecore
Creating large tables is always going to be slow. If a user spent 3 seconds on each of your rows it would take 20 hours to process the whole table, so you are obviously generating a lot of meaningless data the user ignores. There is no fast way to do what you want to do, instead you should...
19 Nov 2015 by F-ES Sitecore
You're not going to learn such a complicated language from a "Quick Answer" on a forum. Buy a book on MVC and go through it. Wrox do some comprehensive books, but there are others too.
26 Jan 2017 by F-ES Sitecore
That's how dropdowns work, there are two elements, the name and the value. The name is what appears in the list and the value is what is submitted with the form. Normally you'd convert the ID back to the relevant text when needed. However if you really do only want the text and you don't care...
17 Oct 2019 by F-ES Sitecore
Have a model that only implements the 4 fields needed for the second view, then create a model that inherits from that model and has the other fields for the first view. Then it is just a matter of passing the right model to the right view. class SmallView { // common four properties } ...
28 Jan 2020 by F-ES Sitecore
I'm amazed you found no useful information about how to deserilise JSON, there are lots of articles. public class OrderChange { public long item1 { get; set; } public long[] item2 { get; set; } } public class Test { public long TEstId { get; set; } public...
12 Aug 2020 by F-ES Sitecore
You treat properties in json that are other objects as properties in your c# classes that are classes that match the property's values. So in your case have an Address class that has the fields for the addresses and add a shipping_address and...
28 Mar 2013 by Florian Rappl
An introduction to async / await, popular mistakes and solutions for asynchronous programming, as well as usages and benefits from using asynchronous programming. We will also discuss interesting patterns based on concurrency.
3 Oct 2013 by FoxRoot
Hello everyone,I am developing a mvc4 application. I am in trouble using models in view. Let me explain the stracture.I have a model class that operates some methods and returns something. The name is KisiBLL.csI have a Controller class. That checks the actions. KisiController.csAnd...
27 Jan 2017 by Francesco Bigi
Hello People, I have this issue:I want to put the marital status on drop down list, when I make the register of the new user, and chose married or unmarried, and click on the save button, on my db i see that it received the id (1, 2) instead of "married" or "unmarried".This is what I see...
27 Jan 2017 by Francesco Bigi
Many thanks to F-ES Sitecore for your help!Actually what I have done is this:// // POST: /Account/Register [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public async Task Register(RegisterViewModel model) { ...
30 Oct 2012 by Frederico Barbosa
The way the MVC pattern works is: you have a "model" (i.e., data) and you can show it with different "views" (e.g., table, graph...), but a particular view handles only a specific model.In your case, you may do one of the following:1) Make "Project" and "Meeting" look the same to the...
26 Jan 2015 by frostcox
Hey guys, I have a strange problem when I deploy my website to my production environment. During development when I post my form back to the controller the ModelState is valid but after deploying to the production enviornment in IIS the ModelState is always invalid after entering in the exact...
26 Jan 2015 by frostcox
Hey Guys, I figured out a way to see what properties in the model state we actually invalid. Hope this helps somebody else.... ICollection _collection = ModelState.Values; foreach (ModelState _modelState in _collection) { ...
19 Jul 2023 by FuFu Dev's
I have a two models (Current and Original) that have the same properties. I want to build in a validation to check if one of the properties (Address - which is a collection consisting of "Country, City, Suburb, Code") have the same values or they...
7 Mar 2014 by gaarapa
where to find samples using complex models and views in MVC 5?? I need samples using model with jquery and samples of CRUD using three or four models in same view.
25 Jul 2015 by Gabriel Leon Leyva
Is there a way to pasa an id from url.action to an iframe? thanks in advance @foreach (var Item in Model.Items) { ...
11 Aug 2020 by Garth J Lancaster
not sure what you mean by Quote: so these are in the JSON as an array (without square brackets). .. it's either proper JSON or not, else thump the person who owns the API and tell them to sharpen up !! (It's really hard to work with bastardised...
23 Nov 2015 by Gluups
Hello,I do not know what the title has to do with it, but about your question, if you have Avast anti-virus, never spend time searching about "because it is used by another process" before trying with Avast dis-activated.
4 Sep 2013 by gt.guybrush
i have some problem in my attempt to create domain model of this situation: Auditor want to create analysis on process or on structure and register relative result There is a catalog of controls, processes and structures A single analysis may involve many processes or many structures...
11 Dec 2011 by Handy Torres
Model Binder for ASP.NET Web Forms
10 Oct 2012 by iceball12
I have code first models with the latest 6.6.x beta driver working.Dbmigrations seem to be working fine as wel.However there seems to be a problem with cascade settings.My models have cascade delete all over them, but the database that gets generated does not reflect these...
26 Aug 2016 by Igor Krein
C# Extensions API for Entity Framework intended to simplify usage of drop-down lists, comboboxes and alike
17 Dec 2014 by Israel Thieme
I did a multilevel bind using index:
22 Dec 2014 by Israel Thieme
I'm having trouble to bind a 2 level nested model. Here is what I've come up so far.Model:RequestSignature Model:public class RequestSignature{ public int Id { get; set; } public string name { get; set;} public virtual ICollection Pages { get; set; } ...
19 Nov 2015 by JagadheeshAP
Hi Everyone, I am very new to MVC-4..Previously I worked as a software developer in ASP.Net...Can anyone tell me how to learn MVC-4 Professionally...And also I need to know why we are using model,datamodel,repository.... Thanks in advance
15 Dec 2017 by Jakub Provaznik
Hi I am working on my own application. I set the the basic crud and when I want to create new item in database through my create form, everything goes well. Problem is when I intentionally miss something and expecting error messages. Then I have an excetion: Quote: The ViewData item that has...
3 Oct 2013 by Jameel VM
You should create a viewModel. ViewModel is nothing but a csharp class which contain whatever the data's displayes in one view. For example first of all create a class which contain all the properties in the kisi model class needed in the view . public class SampleViewModel{public...
22 Aug 2019 by jimmson
You need to pass property name to ModelState.Remove method, not the value. Either pass the property name in string, eg. ModelState.Remove("CurrentShipDt1"); or in the newer .NET framework, you can use nameof() keyword, eg. ModelState.Remove(nameof(Shipment.CurrentShipDt1));
14 Apr 2016 by johannesnestler
Sounds impossible - at least I can't think about a way to do it...Anyway some thoughts:What do you mean you can't add a reference to your core dll? But you crate a "hardcoded" reference (better dependency) to it anyway when reflecting, don't you?Why don't you use any of the "Standard...
10 Apr 2015 by John C Rayan
You have to use reflection and get name and value pair for the properties.
7 Apr 2021 by John Song 2021
Hello everyone! So, basically how can you make all the model instances updated on a daily basis in Django? Right now, I have a model that has each of my students' information. I want to update each of my students information everyday, so that the...
23 Jan 2014 by johnson10016
Hai everyone. I am new to this forum. Can anyone tell me the usage of web form model
23 Apr 2017 by KarstenK
My first advice is that you read and watch some tutorials about UML to understand that stuff. Your will have to talk or write about your solution The second is, that you use some pencil and paper and draw these relations. Hints: - a car has one gear box - a gearbox consists of some gears...
7 Dec 2011 by Kethu Sasikanth
Postback model object for existing HTML using MVC3 and AJAX
18 May 2017 by Khademul Basher
How to create a set of data models from a set of database tables.
23 Apr 2017 by Khubaib Khawar
I have the problem statement to make an Object Model for. Problem Statement: Every vehicle has an engine and a gearbox. A gearbox is composed of pulleys working according to predefined gear ratios. Cars have smaller engines with 4-6 gears while Sports Utility Vehicles (SUVs) have bigger engines...
27 May 2013 by kranthi1988
HI All,Im working on MVC4,We are validating the fileds in MODEL class using data annotation 'ValidationAtrtribute'.Everything is working fine as functionally but while throwing messge to the user, popup meessage window having a Header like 'Message From Webpage' and first word of the...
7 Mar 2014 by Krunal Rohit
Why don't we first look at the Google[^] ? Example is given here[^]. It's not what you want, but still it is less that what you want.-KR
8 Oct 2015 by Krunal Rohit
Error is pretty clear, View requires the AdminModel & You're passing the LoginModel.What you can do is, combine those two models in one and pass that one model only to the view.For example,public class UserViewModel{ public AdminModel adminModel; public LoginMode...
30 Oct 2015 by Krunal Rohit
What I told you in comment, it is right here:Bootstrap Modal Dialog - Loading Content from MVC Partial View[^]ASP.NET MVC 5 List Editor with Bootstrap Modals[^]-KR
30 Oct 2015 by Krunal Rohit
Use LINQ instead:using(var entity = new SqlEntities){ var personals = entity.Personals.ToList();}----------------------------------[Update]Do something like:string sql = "SELECT e.ID, e.Name FROM SqlEntities.Personals AS e"foreach (DbDataRecord rec innew...
19 Nov 2015 by Krunal Rohit
An addition to what F-ES Sitecore (wondering the name :laugh:) has said, refer the ASP.NET MVC[^] site, follow the tutorials. Or maybe the Google[^] would help you.-KR
30 Oct 2015 by LeeMinhSGU
I'm have a database with 2 tables + Personal : ID (PK), Name, Code (FK), Birthdate+ Social : Code (PK), AddressI have added a ADO.NET Entity Data Model, in Model.Context.tt - SqlEntities (My Entities) there only 2 dbset is Personals and Socials so I only can choose a tablestring sql =...
21 Jun 2020 by Leif Simon Goodwin
WPF docking window manager library
17 Dec 2014 by Maciej Los
I'd suggest to read this: Hierarchical Data Binding in ASP.NET[^]
1 Jul 2012 by mails4balaji
Hi,I am trying to assign a value to a model of specific index inside a list of models. However it assigns to all elements irrespective of index. tried even removeat and insert too, nothing seem to work. code snippet as below.BasketDetailsModel basketDetailsModel =...
17 Oct 2019 by Malikdanish
I have two views and both need to be strongly type my model class is having 8 columns in total and my first view needed all these ten fields so i put Required validator on all fields , but on another view i just need the first 4 fields and the rest i do not know , so now I am using the same...
14 Nov 2019 by Malikdanish
I have two tables user and role now while saving UserWithRole I am saving userid,roleId and date, Now on index view i want to show role name rather than role id but in UserwithRole table i am saving Role Id , but role Name is available in another Roles tables so how can i show the role name on...
13 Apr 2020 by Manisha Tambade
mvc model returning Subject Test- (' 1) for input textbox- Subject Test- ('1) when im attaching model field to textbox in one of the function. any idea to fix it. What I have tried: @Html.Raw(HttpUtility.HtmlDecode(@Model.property)); and ...
27 Jul 2015 by Marla Sukesh
This article is continuation of day 6 for Learn MVC Project in 7 Days.
27 Jul 2015 by Marla Sukesh
This article is continuation of day 7 for Learn MVC Project in 7 Days.
27 Feb 2015 by Mayank Engineer
Hi, I am facing problem for returning message from controller not showing on same page is redirected to other pageMy Code for view :@using (Ajax.BeginForm("Components", "Controller", new AjaxOptions { HttpMethod = "POST", ...
28 Jul 2016 by Member 10212775
Dear Members, I am doing project in mvc. I have my forms in bootstrap model for saving and i need to show a message,if i typed anything on any input box and click on close."Data Not Saved. Are you Sure you want to leave the form with out saving the data" i need to show a confirmation...
31 Oct 2022 by Member 10252017
Model: public class ClientSetupDto { public byte Status { get; set; } = 0; public string ClientName { get; set; } public string ClientId { get; set; } } API Request: [HttpPost] ...
12 Jan 2016 by Member 10273293
i have some images and i wanted when user click any image a model popup open and display that image in that popup. but i don't know how to create model popup ?please tell me how to create model popup and use it with imagebutton ?