Disable input editing

  • Sometimes we need disable input for editing, but property readonly disallow send data from server (for example, when we use calendar extender).
  • Example shows how we can disallow editing via javascript.
<asp:TextBox ID="txb_Date" runat="server" onKeyPress="javascript: return false;" onPaste="javascript: return false;" />
<ajaxToolkit:CalendarExtender ID="txb_Date_CalendarExtender" runat="server" PopupButtonID="txb_dateFrom" TargetControlID="txb_Date">
</ajaxToolkit:CalendarExtender>

Access date from calendarextender

  • Access date from calendarextender when readonly property is set.
txb_Date.Text = Request[txb_Date.UniqueID];
programming/net/disableinputedit.txt · Last modified: 2018-06-21 19:48 (external edit)
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0