Search code examples
c#htmlasp.net-mvcoledbole

Pass Value from input text area on button click to database


How do I pass value that is entered into a text input field to following

objCMD.Parameters.AddWithValue("@value", value)

Solution

  • You want this

    objCMD.Parameters.AddWithValue("@value", txtInput.Text).