Category: ASP.NET MVC
-
Five common mistakes for ASP.NET MVC accesing resources : css,js,images,ajax
This is a Razor /MVC5 variant of older post http://msprogrammer.serviciipeweb.ro/2010/10/09/five-common-mistakes-for-asp-net-mvc-accesing-resources-css-js-images-ajax/ To have once for all the link to show to people,because too much makes the same error again and again. (From here – you can use ResolveUrl or Url.Content – it’s the same for me. I use ResolveUrl because I used first …) Case 1…
-
MVC Export List of objects to Excel-Word-PDF-CSV-HTML-XML–Razor style
This is the second part of the demo of the Exporter in action – this time in MVC . It is a little more complicated,because you need to show to the exporter the full path where to put the generated file string filePathExport = Server.MapPath(“~/exports/a” + ExportBase.GetFileExtension((ExportToFormat)id)); All others are the same easy stuff -add…
-
SameId – skip
In the previous post I have show how two users can see each other if they are editing the same product ( in my example,product id 5) But not in all cases the users should be notified about each other – like in,let’s say,view product Id 5. In this case we have an attribute to…
-
Same object edited by 2 users–proactively notifying users
This is a practical example about how two users that comes on the same page will be notified one about other( after an idea of Adrian Petcu) . See the picture : With the NuGet package you can install in your application in this steps: To run : 1. install package from Nuget 2. in…
-
MVC Help View Razor
My passion for .tt files is great . T4MVC is the best example of what you can achieve with .tt files in MVC . Now,the problem: For each project you have a help file must be created. I mostly work with ASP.NET MVC projects – so I frequently have this problem. I have then created…
-
MVC Help View Razor v2
I have added to MVC Help View Razor the possibility to generate also .js files( was a suggestion from Alex Peta ) The code is on github Enjoy!
-
Microformats,Outlook calendar and MVC5
I have a passion for both 3:Microformats,Outlook calendar and MVC 4. So I decided to put together an MVC implementation – first,for calendar. Source code at https://github.com/ignatandrei/MVC4Microformats See online at http://mvc4microformats.apphb.com/Home/Calendar Next week a NUGET download. After that,a VCard implementation .
-
MVC,JsonResult,DateTime and TimeZone
The jsonresult of date time is serializing to the string /Date and some integer value starting with 1970 . The problem is that the browser interprets this value accordingly to the LOCAL TimeZone – and thus the same date is going to be interpreted with a difference. I was thinking that I can adjust from…
-
MVC and auto persisting values
When you have a textbox in HTML (let’s say <input name=”FirstName” type=”text” /> ) And it binds to “FirstName” Property of a Model,and in HttpPost Action you do modify the value and return the same view,the value shown in the textbox is the posted one,not the modified one. ( The first thought is that HttpPost…
-
Redirect and Ajax Redirect in MVC
In the sample example I will have various methods to perform redirects from main page to “About” page of a simple MVC site. In my opinion,there are only 3 cases – 2 goods and one bad – to perform redirection with or without Ajax. First case: A sample redirect and a sample link: The…