You can import namespaces at the beginning of the page and reference them directly.
<%@ Import Namespace="myapp.Controllers" %>
If you have a Product controller in myapp, you can reference this directly without writing myapp.Controllers.Product.
My daily notes about interesting things about programming: WCF, ASP.NET, MVC, Android, IOS, SQL, Design, Algorithms
Thursday, November 25, 2010
Friday, November 19, 2010
How to trigger event for Truncate action in MS SQL
NOTE:
?????
I guess it is not possible to trigger event for Truncate,but prevent it.
From msdn:
TRUNCATE TABLE cannot activate a trigger because the operation does not log individual row deletions. We can prevent truncate action,if we create a view WITH SCHEMABINDING.
If we don't use truncate on the application level, we will be dealing with only delete command. It is easy to prevent that with Instead Of Trigger.
?????
I guess it is not possible to trigger event for Truncate,but prevent it.
From msdn:
TRUNCATE TABLE cannot activate a trigger because the operation does not log individual row deletions. We can prevent truncate action,if we create a view WITH SCHEMABINDING.
If we don't use truncate on the application level, we will be dealing with only delete command. It is easy to prevent that with Instead Of Trigger.
Friday, October 29, 2010
ASP MVC IIS not running
Hey,
I had the same problem on IIS 7.5 with MVC 1. I fixed the problem and listed some steps here:
I had the same problem on IIS 7.5 with MVC 1. I fixed the problem and listed some steps here:
![]() |
| Figure-1:Install other IIS options |
- Read other normal IIS config steps
- If you dont see Asp.Net tab in config option, you need to register asp.net
- %windir%\Microsoft.NET\
Framework\v2.0.50727\aspnet_ regiis.exe -i - You need to check add-on features to install some other components to make IIS work. Installing them solves most of the problem. Redirect is off by default. Go to control panel ->programs-> Windows components part as show on Figure-1. If you don't see your aspx pages, it might be missing .net integration.
- Create your app and add simple html, asp pages for testing
- if it is showing default app, you need to remove that application
- You may need to start and stop application to make it work
- Change app pool identity to local system and give permissions at your database to access your tables for this user
- Allow all users for .net authorization
- It will work after these steps. If not check these:
- You may need to check connection strings to make sure you are connecting to the right sql instance
- Permission problem: You may need to give permission to web folders for application identity. If you change that to something else, add that user to list and give permissions.
Subscribe to:
Posts (Atom)
