how to show only part of text in normal mode in detailsview?

E

Eric

Hi,

I have a detailsview which shows large text. What i want is to show only the
beginning of the text in normal mode and the full text in edit mode.
Here the code:

Thanks
Eric

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:myconn %>"
SelectCommand="SELECT .... FROM mytable"
UpdateCommand="UPDATE ...." >
<UpdateParameters>
<asp:parameter Name="id" Type="Int32" />
....
</UpdateParameters>
</asp:SqlDataSource>

<asp:DetailsView ID="DetailsView1" runat="server" ... >
<Fields>
<asp:TemplateField >
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("n1")
%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TextBox1" TextMode="MultiLine" runat="server" Text='<%#
Bind("n1") %>' ></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top