Search Results

Search found 4 results on 1 pages for 'hungster'.

Page 1/1 | 1 

  • Display empty textbox using Html.TextBoxFor on a not-null property in an EF entity.

    - by hungster
    I am using Entity Framework (v4) entities. I have an entity called Car with a Year property of type integer. The Year property does not allow NULL. I have the following in my Create view: <%= Html.TextBoxFor(model => model.Year) %> I am required to return a new Car object (due to other requirements) in my HttpGet Create action in the CarController. Currently, a zero is displayed in the Year textbox because the Year property does not allow NULL. I would like to display an empty textbox in the Create view. How do I do this?

    Read the article

  • ASP.NET MVC 2 RTM - favicon not displayed in Internet Explorer

    - by hungster
    I have the following two lines in the head section in my masterpage: <link rel="shortcut icon" href="/Content/Images/favicon.ico" type="image/x-icon" /> <link rel="icon" href="/Content/Images/favicon.ico" type="image/ico" /> However, the favicon is not displayed in Internet Explorer (version 6, 7, 8). In Firefox and Safari the favicon works fine. I have even tried to replace href with the URL to my website (http://www......./Content/Images/favicon.ico) but that still does not work in Internet Explorer. Am I missing something?

    Read the article

  • Red border around TextBox when validation fails

    - by hungster
    I am using ASP.NET MVC 2. Html.DropDownListFor and Html.TextAreaFor automatically get red borders when the validation fails. How to make the four borders of a TextBox (using Html.TextBoxFor) red when it fails validation? For example, I have a TextBox that is required and when the user submits the form without specifying a value in the textbox, I want the textbox to have red borders.

    Read the article

1