The below Stored Procedure searches within all the stored procedures in the SQL server database, views, and functions for the given function name. This stored procedure also search for any text written in the stored...
Category - Featured
Excluding Required Property from ModelState.IsValid | ASP.NET MVC Tutorial
You can exclude any property from validating using parameter binding. Set the exclude property in Bind attribute of a parameter as [Bind(Exclude = "Password")] In this way, by add exclusions to your action and...
How to Get Browser Agent from ASP.NET Web API Controller? | ASP.NET Web API Tutorial
The easiest way to get the full user-agent from inside an ASP.NET Web API-controller is as given below: var userAgent = Request.Headers.UserAgent.ToString(); It gives exactly the same result as doing the manual step...
Process Flow of Single and Multitenancy ASP.NET MVC Application | ASP.NET MVC Tutorial
Single-Tenancy Application The steps that lead from a user entering a website address in his browser to viewing the content are fairly straightforward. The browser sends a request for the content at that address to a...
Deleting Multiple Records in Entity Framework | Entity Framework Tutorial
Sometimes you may need to delete multiple records. In such case, developers use to iterate through the collection using foreach and will set each entity state to modified. Some developers use to write an extension...
Generating Unique Token in C# | Generating Unique Token that Expires after 24 Hours in C# | C# Tutorial
There are two possible approaches; either you create a unique value and store somewhere along with the creation time, for example in a database, or you put the creation time inside the token so that you can decode it...
How to Convert Synchronous ASP.NET MVC Action to Asynchronous ASP.NET MVC Action | Asynchronous Support in ASP.NET MVC Controller | ASP.NET MVC Tutorial
In ASP.NET MVC controller action method receives data from a web request and passes the data to a view which then creates the HTML to be sent to the browser. Frequently the action method needs to get data from a...
ng-model Doesn’t Work Inside ng-if | Scope Properties Doesn’t Change inside ng-if | AngularJS Tutorial
If an ng-model is used inside an ng-if, then the model does not work as expected. <div ng-app > <div ng-controller="main"> Test A: {{testa}}<br /> Test B: {{testb}}<br /> Test C: {{testc}}<br...
Simplifying AccountController by Removing External Login Related Actions | ASP.NET MVC Tutorial
There are a number of methods on AccountController related to External Logins. If you examine AccountController carefully, you can go through and delete the code for the following actions: Dissociate() ExternalLogin()...