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

  • Thread starter Thread starter Eric
  • Start date Start date
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>
....
 
Back
Top