locked
Read Only Web Form RRS feed

  • Question

  • User-1096281618 posted

    Hi,


    I was wondering how I could make a web form read only without changing the appearance.  Currently, I've tried disabling the controls on the page, but that causes everything to be greyed out and hard to read. 

    Thanks

    Friday, October 2, 2009 10:23 AM

Answers

  • User-1360095595 posted

    If you use something like a FormView, you can specify different templates for the various states of your form.  So in itemtemplate section, you can show your form iusing regular labels.  And in edit mode you can replace the controls by textboxes, DDLs, etc.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 2, 2009 10:35 AM
  • User-1360095595 posted

    You would simply show the selectedtext for a DDL, and the selected text of the radiobutton as a label as well, I would think.

    No I don't have samples.  Google/Bing are you friends.

    Otherwise check the data access tutorials on this site: http://www.asp.net/learn/data-access/

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 2, 2009 10:56 AM

All replies

  • User-1360095595 posted

    If you use something like a FormView, you can specify different templates for the various states of your form.  So in itemtemplate section, you can show your form iusing regular labels.  And in edit mode you can replace the controls by textboxes, DDLs, etc.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 2, 2009 10:35 AM
  • User-1096281618 posted

    Do you have an example?  I'm not very familar with the FormView control.  Also how would labels work for combobox list and radiobutton list.

    Friday, October 2, 2009 10:44 AM
  • User-1360095595 posted

    You would simply show the selectedtext for a DDL, and the selected text of the radiobutton as a label as well, I would think.

    No I don't have samples.  Google/Bing are you friends.

    Otherwise check the data access tutorials on this site: http://www.asp.net/learn/data-access/

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 2, 2009 10:56 AM