Browse by Tags
All Tags »
asp.net MVC 2 (
RSS)
I’m talking about asp.net MVC2 The point: if you are implementing an IModelBinder for a type, you should add a call to bindingContext.ModelState.SetModelValue(bindingContext.ModelName, valueFromRequest); this is done to make sure that at your controller action you can access ModelState[ nameOfThisProperty ] and nameOfThisProperty will be present as a key at ModelState also for successful binding. And for the details: ( Partial form validation including custom modelBinding ...
Still haven't upgraded to the visual studio 2010 RTM, so I'm talking about version RC1 of MVC2(the one that shipped with VS2010 RC), But i guess this is also the case with the RTM version. We followed the excellent post by Rob Conery and implemented our own ActionFilterAttribute to validate that only authenticated users gain access to some of the actions. At OnActionExecuting we checked for anonymous users and redirected them to the login page. All went well till Accidentally i stumbled upon...
Have been doing a lot of asp.new MVC the past three months, learning it as we build the project(hope to share more in the near future). We are using visual studio 2010, so now we're stuck with MVC2 RC1 since RTM wasn't shipped for the the RC version of 2010 (and yes this is a huge rant!!, we are stuck with 2010 since we also chose to work with entity framework 4 which only work on framework 4.0). This is why i suspect every feature that doesn't work well as a problem of an early release...
החלטנו בצוות לכתוב את המערכת החדשה ב MVC 2 (נשבר כבר מזמן מ web Forms). מבנה הספריות הדיפולטי לא מתאים לנו - לוגית האפליקציה שלנו מחולקת לשני תחומים עיקריים, לכן רצינו פיצול של הקוד, בעיקר מטעמי תחזוקה. ב web Forms היינו יוצרים שתי ספריות ומתחת לכל ספריה היו נמצאים הקבצים הרלוונטים אליה. ב MVC 2 התווסף הפיצ'ר Areas, או יותר נכון single-project area (בגרסא הסופית של MVC 2 לא ישוחרר הפיצ'ר של פיזור areas בפרוייקטים שונים, אבל מי צריך את זה בכלל)- הכוונה - הוספת ספריה בשם Areas ב root של הפרוייקט...