Category: HowTo
-
First Install of tools for programmer
My primary tools are Visual Studio ( and the Express suite),Sql Server ( and SQL Server Management Studio )( and the Express suite) and Office (Excel,Word) Those are the modification that I do every time … I wish there were enabled by default : For VS2010 Go to=> Tools,Options,Html,Formatting,Check “ Insert attribute value quotes when…
-
TT files – generate enum from database
Many times you will program against a table that contains something like an enum,like Status( open=1,close=2,sent=3,approved=4 ) . It is peculiar to wrote those status as text in the other tables – and you do not like also to have update their codes in the C# (VB.NET) code source each time you will add another…
-
My standard way to work with dropdown box in ASP.NET MVC – 2 steps (or 3 if you want to add long description)
I have written a small post about dropdownlist template in ASP.NET MVC here : http://msprogrammer.serviciipeweb.ro/2010/05/30/mvc-helper-templates/ I think that the dropdownlist should be explained more – aand the example will be : First,let’s say we have Employee and Department. And we have Employee that has a field,named IDDepartment. When edit/create a user we want to display…
-
ASP.NET MVC pass data from a view to master
One of recurring questions in MVC is how to share data between views and master. The question must be reformulated : how to share data between ACTION and master. The short answer is : Model of the View returned from Action have to put some data to the Model of the Master The long answer…
-
ASP.NET MVC editing fast a property
There are some moments when you want to fast edit a property ( like a status or a name) and you do not want to load the entire “Edit” form for this.More,you are in an edit formula and do not want to add a form. So here is the solution in ASP.NET MVC with jquery-1.4.2.min,jquery-ui-1.8.1.custom.min…
-
Asp.NET MVC and DOS – re-using the ViewModels
(Please read first : http://msprogrammer.serviciipeweb.ro/2010/03/29/asp-net-mvc-orm-and-viewmodels/ ) One of the biggest challenges in programming was write once- GUI everywhere ( Ok,ORM impedance mismatch is another story) I mean by that re-using the logic from an application in another application. ASP.NET MVC,with the commitment to strongly viewmodels,make me think that it will be now easier to transfer…
-
EF,automatic history of table and T4 files (TT files)
Usually the data of the tables should be tracking for who modified it. Think about inserting/updating/deleting an employee : you must know who did those actions and when. So you create another table,identically as structure,and you add another 3 fields,such as [ModifiedDate](when),[ModifiedBy](who),[ModifiedType] (what : insert,update,delete). There are several methods to do it : from database…
-
MVC Helper Templates
In my experiences with MVC I have some utilities to share . Some of them are : DateTime fields Numeric fields Watermark Dropdownlist more! Please see the project and give feedback MvcHelperApplication
-
Caching in .NET
In every application you have some data that is more read-more,write-once or twice. For example you can have the list of Cities of a country,the list of Countries of the world or list of exchange currency. This data is modified rarely. Also,you can have data that is not very sensitive to be real-time,such as the…
-
Intercept errors
Errors interception and rising Description We will speak here about the errors raised by external conditions (bugs) and the errors rose by the application. There is not application without bugs. The bugs are not desired for an application – but programmers are human beings and,by consequence,they cannot verify every possible path that go an application…