Tag: .NET
-
Programmer tools 2011
List of programmer tools I have re-installed the PC and I have been taken notice of what tools I have on the system now: Magic Disc – can mount .iso files ( for 2 ) Visual Studio – must have for a easy developing path Sql Server 2008 – primary database for me 7-zip –…
-
path.combine idiosyncrasies
I have this small program : In what conditions,if I have an “C:\andrei” folder with a single file,the output will be the name of the file ? And where you want to be aware of this behaviour ? Hint : The output is : \andrei\New Text Document.txt
-
Find the Error
This code was written by me,in a late night moment,when copy paste seems the best option It started this way : So far,nothing special. Just open the url,read into an XML,return first nodes. Then I wanted more – next nodes. Nothing easier – why bother with recursion or proper variable names ? Just copy and…
-
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…
-
C# quiz
Fast small quiz for sunny afternoon : What is writing at the console those lines : ( please do not use a compiler) :
-
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…