Print this page
Saturday, 19 January 2013 13:55

how to make uneditable textbox

Written by 
Rate this item
(0 votes)

you have tried to show data in the asp.net textbox
control and wanted that user will not be able to
modify data in the textbox or cursor will not be
shown in the textbox or other technical reason
then this tips can help you -

i have tried to make textbox uneditable by setting
the Enabled property of the textbox to false but
the problem is internet explorer do not show scroll
bar for the textbox content.but hopefully i found
the solution by setting the ReadOnly property to true -

<asp:TextBox ID="items" ReadOnly="true" Rows="7"
Font-Size="10" CssClass="textbox" BorderColor="White"
BorderWidth="1px" TextMode="MultiLine" runat="server"
Text='<%# Eval("desc") %>' ></asp:TextBox>

Read 4172 times
Super User

Email This email address is being protected from spambots. You need JavaScript enabled to view it.
7