Tag: ASP.NET MVC
-
Interfaces and more
Summary: If you want common behavior,you need an interface. And from the first one is a small step to re-organizing the program. Body: When you make a component for other people,you must make the possibility for those to 1. customize your software with their software 2. provide a default implementation For the messaging component,the…
-
Backup application for Windows Azure
I have written( with Vunvulea Radu and Catalin Gheorghiu) a backup application for Azure. It is made with MVC + Azure Tables. It was made initially for a contest,but I intend to work further and progress . You can play at http://backupapp.cloudapp.net/ The code source is on http://myazurebackup.codeplex.com/ – and you can add also your…
-
MVC Zip Result
Sometimes you need to send to the user more than 1 file – or,maybe,the file is too large The simplest way is : made a zip file that contains the others. What do you need 1. SharpzipLib from http://www.icsharpcode.net/opensource/sharpziplib/ ( or download via NuGet in VS) 2. obtain the file(s) that you want as a…
-
ASP.NET MVC make users–roles fast
please left click on “Microsoft SQL Server Management Studio (push button)” please create a database in “Microsoft SQL Server Management Studio” please left click on “C:\Windows\system32\cmd.exe (push button)” and enter the following command : aspnet_regsql.exe -E -S .\SQLExpress -d proprii -A rm please left click on “ListPanel (list)” in “Microsoft SQL Server Management Studio” please…
-
mvc windows authentication
If you want to use Windows Authentication with MVC : Step 1 : In web.config,put authentication mode windows Step 2 : in IIS disable anonymous Step 3 : go to Views\Shared\LogOnUserControl.ascx and remove logoff / logon links.
-
Error intercepting in MVC when saving data
I have seen many times in MVC the following code,when doing a post and saving data : Why is not good ? I will do a simple example : if some error occurs on the database level ( such as simple unique index on a name column ) or even some error occurs whenestablishing the…
-
A programmer day with “That assembly does not allow partially trusted callers”
I make a website,works on local IIS. Performs user registration + uploading some zip files + generating custom feeds for those zip files. Using SharpZipLib_0860_Bin ( to unzip file ),StringTemplate.dll ( to perform custom feed generation ) and NUnit-2.5.7.10213 ( to perform tests). So far,so good. Moving into production . User registration works,upload works,trying feeds…
-
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 The image does not display Please check you have the…
-
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…