at present i am displaying the full message at a time in label in grid like this.
<asp:TemplateField HeaderText="Message" ItemStyle-CssClass="gridlabeltextleftalign">
<ItemTemplate>
<div style="word-wrap: break-word; width: 240px; text-align: left">
<asp:Label ID="lblMessage" runat="server" Font-Size="12px" Text='<%#DataBinder.Eval(Container.DataItem, "Message") %>'></asp:Label>
</div>
</ItemTemplate>
</asp:TemplateField>
i want display message in single line when click on it then display the whole message .
pls tell me .
show a fixed length string (not full message ->eg: mes...) at first.
Declare a protected string in page load and then bind it in each page load. After this directly assign the protected string to a javascript array.
see the code below:
In page load
protected string protectedString = "";
In Javascript function that should be called on MouseOver event:
JavascriptArray = "<%= protectedString %>";
Set the array as innerHTML of DIV.
Hope this helps...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With