locked
asp.net webforms bound textbox RRS feed

  • Question

  • I am new to asp and trying to get a understanding of webform data binding. Using a SQL datasource, how do I bind a textbox for editing?

    Thank you. -ME

    • Moved by Neda Zhang Tuesday, February 14, 2017 5:43 AM Moved from vb forum
    Monday, February 6, 2017 8:40 PM

Answers

  • I am new to asp and trying to get a understanding of webform data binding. Using a SQL datasource, how do I bind a textbox for editing?

    Thank you. -ME

    You cannot, with a webform the data is not processed at the same place as where the data is entered. 

    You can save the data in a session and then bind,but it is not completely the same as databinding for a desktop. 

    However, this is more a question for the Microsoft asp.net forums. 

    http://forums.asp.net


    Success
    Cor

    • Proposed as answer by Neda Zhang Tuesday, February 7, 2017 7:32 AM
    • Marked as answer by kingelk Tuesday, February 14, 2017 12:44 PM
    Monday, February 6, 2017 11:05 PM
  • Hi kingelk,

    Thank you for posting here.

    You cannot just bind textbox, there is no DataSourceID property on textbox. My suggestion is that you could create a DataList using the DataSource and on ItemTemplate.

    For more information about SqlDataSource you could refer that: https://msdn.microsoft.com/en-us/library/fkzs2t3h.aspx

    If you have more about asp.net issue, I suggest that you could post it to asp.net forum for better support.

    Best Regards,

    Neda Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by kingelk Tuesday, February 14, 2017 12:44 PM
    Tuesday, February 7, 2017 7:50 AM

All replies

  • I am new to asp and trying to get a understanding of webform data binding. Using a SQL datasource, how do I bind a textbox for editing?

    Thank you. -ME

    You cannot, with a webform the data is not processed at the same place as where the data is entered. 

    You can save the data in a session and then bind,but it is not completely the same as databinding for a desktop. 

    However, this is more a question for the Microsoft asp.net forums. 

    http://forums.asp.net


    Success
    Cor

    • Proposed as answer by Neda Zhang Tuesday, February 7, 2017 7:32 AM
    • Marked as answer by kingelk Tuesday, February 14, 2017 12:44 PM
    Monday, February 6, 2017 11:05 PM
  • Hi kingelk,

    Thank you for posting here.

    You cannot just bind textbox, there is no DataSourceID property on textbox. My suggestion is that you could create a DataList using the DataSource and on ItemTemplate.

    For more information about SqlDataSource you could refer that: https://msdn.microsoft.com/en-us/library/fkzs2t3h.aspx

    If you have more about asp.net issue, I suggest that you could post it to asp.net forum for better support.

    Best Regards,

    Neda Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by kingelk Tuesday, February 14, 2017 12:44 PM
    Tuesday, February 7, 2017 7:50 AM