Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

html.textboxfor

How to set value in @Html.TextBoxFor in Razor syntax?

April 12, 2024 by Tarik

The problem is that you are using a lower case v. You need to set it to Value and it should fix your issue: @Html.TextBoxFor(model => model.Destination, new { id = “txtPlace”, Value= “3” })

Categories .net Tags .net, asp.net-mvc, asp.net-mvc-3, html.textboxfor, razor Leave a comment

What is readonly for in a disabled TextBoxFor?

December 23, 2023 by Tarik

Usually you would use one or the other, not both. Readonly allows users to focus on the textbox to copy text or trigger an event. Readonly fields will be posted with the form. With a disabled field, users cannot give focus to the textbox and the field will NOT be posted with the form. Which … Read more

Categories asp.net-mvc-5 Tags asp.net-mvc-5, html.textboxfor Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa