<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Asp.net Mvc on Emad Alashi</title>
    <link>https://emadashi.com/tags/asp.net-mvc/</link>
    <description>Recent content in Asp.net Mvc on Emad Alashi</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 19 Nov 2013 10:18:18 +0000</lastBuildDate>
    <atom:link href="https://emadashi.com/tags/asp.net-mvc/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>OAuth Authentication in OWIN</title>
      <link>https://emadashi.com/2013/11/oauth-authentication-in-owin/</link>
      <pubDate>Tue, 19 Nov 2013 10:18:18 +0000</pubDate>
      <guid>https://emadashi.com/2013/11/oauth-authentication-in-owin/</guid>
      <description>&lt;p&gt;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.&lt;br&gt;
You can find below the link to the source code, the presentation slides, and the video on Youtube.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/eashi/Samples/tree/master/OAuthSample&#34;&gt;Source code on GitHub&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For some reason the animation doesn’t work on Slideshare, maybe because it was Office 2013&lt;/p&gt;
&lt;div style=&#34;margin-bottom: 5px&#34;&gt;
  &lt;strong&gt;&lt;a title=&#34;OAuth in the new .NET world (OWIN)&#34; href=&#34;https://www.slideshare.net/splashup/o-auth-20dotnetandowin&#34; target=&#34;_blank&#34;&gt;OAuth in the new .NET world (OWIN)&lt;/a&gt; &lt;/strong&gt;from &lt;strong&gt;&lt;a href=&#34;http://www.slideshare.net/splashup&#34; target=&#34;_blank&#34;&gt;Emad Alashi&lt;/a&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;p&gt;Enjoy 🙂&lt;/p&gt;</description>
    </item>
    <item>
      <title>Html.EditorFor, Model Property vs RouteData Value</title>
      <link>https://emadashi.com/2012/05/html-editorfor-model-property-vs-routedata-value/</link>
      <pubDate>Sun, 13 May 2012 15:41:40 +0000</pubDate>
      <guid>https://emadashi.com/2012/05/html-editorfor-model-property-vs-routedata-value/</guid>
      <description>&lt;p&gt;The ASP.NET MVC team made our lives easier when they created the Html editor extension method &lt;em&gt;&lt;a href=&#34;http://msdn.microsoft.com/en-us/library/system.web.mvc.html.editorextensions.editorfor.aspx&#34; target=&#34;_blank&#34;&gt;Html.EditoFor()&lt;/a&gt;;&lt;/em&gt; you just pass the model property and it creates the right editor, filling it with the property’s value…but not always!&lt;/p&gt;
&lt;p&gt;Let’s consider that we have the conventional route definition:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;routes.MapRoute(
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Default&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#75715e&#34;&gt;// Route name&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;{controller}/{action}/{id}&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#75715e&#34;&gt;// URL with parameters&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; { controller = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Home&amp;#34;&lt;/span&gt;, action = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Index&amp;#34;&lt;/span&gt;, id = UrlParameter.Optional } &lt;span style=&#34;color:#75715e&#34;&gt;// Parameter defaults&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and this simple action method:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How Html.Action() Work</title>
      <link>https://emadashi.com/2012/03/how-html-action-work/</link>
      <pubDate>Fri, 23 Mar 2012 15:30:48 +0000</pubDate>
      <guid>https://emadashi.com/2012/03/how-html-action-work/</guid>
      <description>&lt;p&gt;Let’s take the example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-razor&#34; data-lang=&#34;razor&#34;&gt;@Html.Action(&amp;#34;Latest&amp;#34;, &amp;#34;Episode&amp;#34;)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;What this will do is to invoke the “&lt;em&gt;Latest&lt;/em&gt;” action method in the “&lt;em&gt;Episode&lt;/em&gt;” 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 “&lt;em&gt;Latest&lt;/em&gt;” and “&lt;em&gt;Episode&lt;/em&gt;” as Route values for the keys “&lt;em&gt;action&lt;/em&gt;” and “&lt;em&gt;controller&lt;/em&gt;” respectively.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</description>
    </item>
    <item>
      <title>QueryString in Routing and Model Binding in ASP.NET MVC</title>
      <link>https://emadashi.com/2012/01/querystring-in-routing-and-model-binding-in-asp-net-mvc/</link>
      <pubDate>Fri, 13 Jan 2012 14:39:57 +0000</pubDate>
      <guid>https://emadashi.com/2012/01/querystring-in-routing-and-model-binding-in-asp-net-mvc/</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Now the details. Let us consider this ASP.NET MVC application. We have an action method:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Reflections on Jordev Web Camp</title>
      <link>https://emadashi.com/2011/05/reflections-on-jordev-web-camp/</link>
      <pubDate>Mon, 16 May 2011 22:11:05 +0000</pubDate>
      <guid>https://emadashi.com/2011/05/reflections-on-jordev-web-camp/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.emadashi.com/misc/images/634a70b9a492_148FE/webcamps.png&#34;&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; style=&#34;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&#34; title=&#34;webcamps&#34; border=&#34;0&#34; alt=&#34;webcamps&#34; align=&#34;right&#34; src=&#34;https://www.emadashi.com/misc/images/634a70b9a492_148FE/webcamps_thumb.png&#34; width=&#34;244&#34; height=&#34;194&#34; /&gt;&lt;/a&gt;Last Saturday 14th of May 2011 we had the first &lt;a href=&#34;http://webcamps.ms&#34;&gt;web camp&lt;/a&gt; in Jordan among Jordev’s activities, and it was great!&lt;br&gt;
&lt;em&gt;check my presentation slides at the end of this post.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The event was like the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;8:30 AM – 9:00 AM&lt;/strong&gt;: Registration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;9:00 AM – 1:00 PM&lt;/strong&gt;: 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 “&lt;a href=&#34;http://www.slideshare.net/omarq/entity-framework41codefirst&#34;&gt;Entity Framework 4.1&lt;/a&gt;”, “&lt;a href=&#34;http://www.slideshare.net/splashup/aspnet-mvc-one-step-deeper&#34;&gt;ASP.NET MVC One Step Deeper&lt;/a&gt;”, “Dynamic Data”, and “&lt;a href=&#34;http://www.slideshare.net/i.omar/jquery-7978005&#34;&gt;jQuery&lt;/a&gt;”&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1:00 PM – 2:15 PM&lt;/strong&gt;: lunch break, where people went to the near market and had their lunch there.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2:15 PM – 4:30 PM&lt;/strong&gt;: free coding session.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Things went great&lt;/strong&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>First Jordev Web Camp</title>
      <link>https://emadashi.com/2011/05/first-jordev-web-camp/</link>
      <pubDate>Sat, 07 May 2011 10:40:05 +0000</pubDate>
      <guid>https://emadashi.com/2011/05/first-jordev-web-camp/</guid>
      <description>&lt;p&gt;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 &lt;a href=&#34;http://ammanwebcamp.eventbrite.com/&#34;&gt;first web camp&lt;/a&gt; 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.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://webcamps.ms&#34;&gt;&lt;img alt=&#34;First Jordev Web Camp&#34; loading=&#34;lazy&#34; src=&#34;https://www.emadashi.com/misc/images/First-Jordev-Web-Camp_B88A/1637932099-3_thumb.png&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Code Sample Should Be Clean</title>
      <link>https://emadashi.com/2011/04/code-sample-should-be-clean/</link>
      <pubDate>Sat, 02 Apr 2011 15:21:46 +0000</pubDate>
      <guid>https://emadashi.com/2011/04/code-sample-should-be-clean/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.emadashi.com/misc/images/693e7de0646a_15FD/big_Telerik01.gif&#34;&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; style=&#34;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&#34; title=&#34;big_Telerik01&#34; border=&#34;0&#34; alt=&#34;big_Telerik01&#34; align=&#34;right&#34; src=&#34;https://www.emadashi.com/misc/images/693e7de0646a_15FD/big_Telerik01_thumb.gif&#34; width=&#34;229&#34; height=&#34;94&#34; /&gt;&lt;/a&gt;The other day I needed an ASP.NET MVC grid control, and I have always heard about &lt;a href=&#34;http://www.telerik.com/products/aspnet-mvc.aspx&#34;&gt;Telerik’s ASP.NET MVC Extensions&lt;/a&gt; and the great tools they provide, so I decided to give them a try.&lt;/p&gt;
&lt;p&gt;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.&lt;br&gt;
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”!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introduction to ASP.NET MVC session at Jordev</title>
      <link>https://emadashi.com/2010/11/introduction-to-asp-net-mvc-session-at-jordev/</link>
      <pubDate>Fri, 26 Nov 2010 23:51:47 +0000</pubDate>
      <guid>https://emadashi.com/2010/11/introduction-to-asp-net-mvc-session-at-jordev/</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;you can find the slides on Slideshare, embedded here as well:&lt;/p&gt;
&lt;div style=&#34;width: 425px&#34; id=&#34;__ss_5926505&#34;&gt;
  &lt;strong style=&#34;margin: 12px 0px 4px; display: block&#34;&gt;&lt;a title=&#34;Introduction to ASP.NET MVC&#34; href=&#34;http://www.slideshare.net/splashup/introduction-to-aspnet-mvc-5926505&#34;&gt;Introduction to ASP.NET MVC&lt;/a&gt;&lt;/strong&gt; &lt;/p&gt; 
  &lt;div style=&#34;padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 5px&#34;&gt;
    View more &lt;a href=&#34;http://www.slideshare.net/&#34;&gt;presentations&lt;/a&gt; from &lt;a href=&#34;http://www.slideshare.net/splashup&#34;&gt;Emad Alashi&lt;/a&gt;.
  &lt;/div&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
