Friday 21 September 2012

How to create an else- if statement in View in MVC Razor

@model MvcApplication.Models.Models.DemoModel

@{
    bool visible = Model.Visible;
}

@if(visible)
{
Html.TextBoxFor(bs => Model.Row_Description,new{@class = "rowdesc", size = 45 })
}
else{
Html.TextBoxFor(bs => Model.Row_Description,new{ size = 45, disabled ="disabled")
}

5 comments:

  1. http://www.codeproject.com/Articles/260470/PDF-reporting-using-ASP-NET-MVC3

    ReplyDelete
  2. http://yassershaikh.com/how-to-create-a-modal-popup-in-asp-net-mvc-3-using-jquery/

    ReplyDelete
  3. http://weblogs.asp.net/imranbaloch/archive/2011/09/13/webgrid-helper-with-check-all-checkboxes.aspx

    ReplyDelete
  4. http://www.craftyfella.com/2010/01/syntax-highlighting-with-blogger-engine.html

    ReplyDelete