🇵🇸 Call for a #CeasefireNOW 🇵🇸

Act Now

OAuth Authentication in OWIN

Last week I got the chance to speak on the Victoria .net user group, presenting OAuth authentication (and authentication in general) in the new .net web world of OWIN. You can find below the link to the source code, the presentation slides, and the video on Youtube. Source code on GitHub For some reason the animation doesn’t work on Slideshare, maybe because it was Office 2013 OAuth in the new .NET world (OWIN) from Emad Alashi Enjoy 🙂 ...

November 19, 2013 Â· Emad Alashi

Html.EditorFor, Model Property vs RouteData Value

The ASP.NET MVC team made our lives easier when they created the Html editor extension method Html.EditoFor(); you just pass the model property and it creates the right editor, filling it with the property’s value…but not always! Let’s consider that we have the conventional route definition: routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); and this simple action method: ...

May 13, 2012 Â· Emad Alashi

How Html.Action() Work

Let’s take the example: @Html.Action("Latest", "Episode") What this will do is to invoke the “Latest” action method in the “Episode” controller. But what really happens behind the scenes is NOT a direct invoke; it will actually start from the beginning of the ASP.NET MVC execution pipeline using “Latest” and “Episode” as Route values for the keys “action” and “controller” respectively. This means that you should pay very good attention to your Routes definition in the Application_Start() in Global.asax; Html.Action() will try to match the best route in your defined routes according to the RouteValueDictionary created above (action and controller) along with any additional route values provided in the overload. ...

March 23, 2012 Â· Emad Alashi

QueryString in Routing and Model Binding in ASP.NET MVC

In a nutshell, a query string will not be part of the RouteData dictionary in the routing process, yet it will affect the route matching. On the other hand, when Model Binding takes place, query string will be used to bind to the parameters of the action method, unless there is an item in route data with the same key. Now the details. Let us consider this ASP.NET MVC application. We have an action method: ...

January 13, 2012 Â· Emad Alashi

Reflections on Jordev Web Camp

Last Saturday 14th of May 2011 we had the first web camp in Jordan among Jordev’s activities, and it was great! check my presentation slides at the end of this post. The event was like the following: 8:30 AM – 9:00 AM: Registration 9:00 AM – 1:00 PM: Four 50 minutes sessions with 10 minutes between each for breaks, there was a few attendees at the beginning so we delayed the first session for couple of minutes (yes we have a morning problem here). Sessions were “Entity Framework 4.1”, “ASP.NET MVC One Step Deeper”, “Dynamic Data”, and “jQuery” 1:00 PM – 2:15 PM: lunch break, where people went to the near market and had their lunch there. 2:15 PM – 4:30 PM: free coding session. Things went great: ...

May 16, 2011 Â· Emad Alashi

First Jordev Web Camp

For too long, all Jordev’s activities have been in the form of sessions with fast code demos, and for the first time we are going to break this rule and do our first web camp in which attendees will have the chance to have hands-on experience with some of Jordan’s active experts. It will be on the 15th of May 2011. There are two things in web camps that make them more interesting: REAL CODING and COLLABORATION; coding is a practice science, best way to learn it is by practice, and this practice will be much more fruitful and enjoyable if done with a bunch of enthusiasts who share the same passion with you. Speakers will have their share, but the biggest share will go to the hidden experts who have been hiding under excessive working hours and who avoid boring talkative sessions. This gathering will be a chance for us to dig these gems out and have the most geeky fun and benefit we seek in such communities. ...

May 7, 2011 Â· Emad Alashi

Code Sample Should Be Clean

The other day I needed an ASP.NET MVC grid control, and I have always heard about Telerik’s ASP.NET MVC Extensions and the great tools they provide, so I decided to give them a try. So I followed the installation guide step by step, and prepared my code to use the extensions; I added a reference to the DLL, added the scripts, etc… and I thought I was ready to test-drive it. I opened Telerik’s sample website which showed the control and below it the code sample that made it work, innocently enough I did what any other developer would do to try out the sample code: copy and paste it in your page and then build. To my surprise there was an error in the View; it didn’t recognize an Extension method called “Configurator”! ...

April 2, 2011 Â· Emad Alashi

Introduction to ASP.NET MVC session at Jordev

It was great to get back to presentations after this while; ASP.NET MVC was the topic for the latest session I delivered through Jordev. The audience was great, I hope they enjoyed it as much as I did preparing for it. you can find the slides on Slideshare, embedded here as well: Introduction to ASP.NET MVC View more presentations from Emad Alashi. ...

November 26, 2010 Â· Emad Alashi