locked
Bootstrap Input Type RRS feed

  • Question

  • User-1499457942 posted

    Hi

      How to use BootStrap Input type in aspx pages . I am not able to use on Code Behind

    Thanks

    Friday, July 27, 2018 12:01 PM

Answers

  • User-821857111 posted

    Give it a "name" attribute and get the value from Request.Form when the page is posted:

    <input type="text" name="email" class="input-sm form-control" />

    Then use Request.Form["email"] to get the value.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 27, 2018 12:15 PM

All replies

  • User-821857111 posted

    Give it a "name" attribute and get the value from Request.Form when the page is posted:

    <input type="text" name="email" class="input-sm form-control" />

    Then use Request.Form["email"] to get the value.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 27, 2018 12:15 PM
  • User-1499457942 posted

    Hi

     If i had to use in below line then how it is to be done

    cmd.Parameters.AddWithValue("@No", SqlDbType.VarChar).Value = txtNo.Text;

    Thanks

    Friday, July 27, 2018 12:22 PM
  • User-821857111 posted

    cmd.Parameters.AddWithValue("@No", SqlDbType.VarChar).Value = Request.Form["txtNo"];

    Friday, July 27, 2018 12:30 PM
  • User-1171043462 posted

    You can also use runat="server"

    <input type="text" runat = "server" id="txtNo" class="input-sm form-control" />

    And do

    cmd.Parameters.AddWithValue("@No", SqlDbType.VarChar).Value = txtNo.Value;

    Sunday, July 29, 2018 2:02 PM