How to make description short ...

 Hello, I'm working on an app which displays some large body of text in a

datalist. The text can be up to 500 characters long which is long considering

I have records to bind possibly over 20. So what I want to do is

make the description shorter such as 

"This is a very long description ... the end" or something along those lines

whereas the user clicks on the ellipse (...) and the rest of the description 

shows up. Can someone help with this?

 Thanks in advance,



2/29/2008 12:02:27 AM 93655 articles. 2 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 0


u should use hyperlink control to display discription.

in ItemDataBound Event of DataList u should do like

 protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
        HyperLink hp = (HyperLink)e.Item.FindControl("HyperLinkControl ");
        string Description = DataBinder.Eval(e.Item.DataItem, "DescriptionField").ToString();
        string ID=DataBinder.Eval(e.Item.DataItem, "IDField").ToString();
        hp.Text = Description.Substring(0, 100);
        hp.Text += "....";
        hp.Attributes.Add("onclick", "<script>" + ID + ");</script>");


on dscription page u might use the following logic

  if (Request.QueryString["ID"] != null)
            string ID = Request.QueryString["ID"].ToString();
            //Query database and Get Discription for this ID"
            Labe1.Text=//assign description




Please remember to click “Mark as Answer”, if it is solution to your Problem
2/29/2008 12:39:46 AM

I think u can add a div under short description. Initially set the display none. When user click on short link then shows the div + catch the newly open div id & save it in a hidden control. So when user click another short description then hide the previously open div & show then current div. For example of UI u can check the googlereader concept.

Shawpnendu Bikash Maloroy
2/29/2008 5:53:37 AM

Similar Artilces:

How to Make Web Forms from other Web Forms
In putting together an ASP.NET application for a biz application, we have come to the point where there are three different types of basic forms which have, for the most part, been perfected. Now its is a matter of cloning those forms for various uses and modifying or adding code to suit the particular need. Copy and paste works OK, but there is a lot of changing of certain words, etc. Is there a way in ASP.NET to take these basic forms, turn them into classes or templates, create forms from them, then add or overwrite code? ? (Anybody who is a Vis Fox Pro programmer would know imme...

Implementing .Net Form into an web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

superreview requested: [Bug 410500] Add "Web form password" description to web form keychain items : [Attachment 295140] fix
Stuart Morgan <> has asked Mark Mentovai <> for superreview: Bug 410500: Add "Web form password" description to web form keychain items Attachment 295140: fix ...

superreview denied: [Bug 410500] Add "Web form password" description to web form keychain items : [Attachment 295140] fix
Mark Mentovai <> has denied Stuart Morgan <>'s request for superreview: Bug 410500: Add "Web form password" description to web form keychain items Attachment 295140: fix ------- Additional Comments from Mark Mentovai <> Not localizable :( ...

windows forms in vb .net into web forms
we are creating a database driven website as part of our project. currently we have forms connecting to the database created in visual basic. these windows forms we need to convert into web forms which are asp .net compatible. can u give me an answer or show me a way. Hi, because of the difference in nature between web and win applications you'll need to reimplement at least the UI part. If you have a multitiered application in which the busines logic and data access are in different parts/assemblies you can reuse them. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Wor...

How to make the Enter key act as the Tab key in PB 11 .NET Web Forms application?
Dear All, I am using PowerBuilder 11 build 6525 to develop a .NET Web Forms application. I would like to make the Enter key behave like the Tab key for our end users to input data (in DataWindow and EditMask controls) inside this application. I have found that in JavaScript, something like the following code can achieve what we want: if (event.keyCode==13) {event.keyCode=9; return event.keyCode;} N.B. Enter key has the keyCode 13 while Tab key has the keyCode 9. However, it seems that all the key press related events (such as "pbm_dwnprocessenter" and &quo...

.Net Web Form & Web Service Deployment
Hi all I have written some test web services and some web form applications and deployed them to my IIS. That's fine but I now want to deploy them to my real IIS server. I have created an msi for each but the problem is I seem to only be able to deploy to the default web site. Our default web site is turned off and instead we use several other sites. Does anybody happen to if Powerbuilder 11 supports non default web sites? If not do I need to hack the msi and if so can anybody suggest a suitable tool. I have Orca but it's not very friendly. Unless of course I knew exactly w...

Web forms and mobile web forms
Hey everyone, I am looking to develope a web site that depending on the device connecting to it, it will display a certain page. In this case im looking to create a web and wap version of the same project. I have the Web forms version finished using ASP.NET and C# and I am wondering how to create the mobile web form and incorporate it in the project. In the project folder, can I just add a mobile web??? But what about displaying device specific pages?? Cheers -Dudach Yes, you can add mobile web forms and controls to your Web Application project. No problem. For device/br...

Making a web page ( Data Form ) look like a manual form
Hello All,In my application I need to make a form look exactly same as a paper form. Well the form will be presented to the user to fill in personal information. I need to make the form look exactly same as the Paper form, So that user have a feeling that they are writing in the form, but by keyboard.Once that form is filled, user will press print. The the data will be printed exactly on same paper form. I need to do this so that I have the same data in Database, and I can print that in future also. User do not need to do the manual workThank You,Shail ShailAtlas: Hello All,In my applic...

For interrupting.web form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form
Web Form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form ! Because of my pool English, if you can't see , I will explain more ! ThanksGambler is the real life I guess you mean when form grows it also grow parent div element. This is normal. If you want div to stay fixed size and rather clip the form and maybe show a scrollbar, look at overflow property in CSS.Thanks------------------------------------------------------------This posting is provided "AS IS" with no warranties, and confers no ...

How to make Master page to be visible=false for particular web form in a web application
Hi all,         I am using master page in my application. i have selected masterpage while adding a new form. But now i don't want the master page in one of my web form.Can any  one help in solving out this. Radhi Remove the masterpage name in the @page attribute and add the other HTML tags that are needed in a webformVikram www.vikramlakhotia.comPlease mark the answer if it helped you Hi Radhika, Simply do this page.MasterPageFile=nothing  Do mark as answer if it helpsBest RegardsAli Sufyan ButtSoftware EngineerElectron...

Making a .NET 1.1 Web Project .NET 2.0 enabled
We were able to use such things as  below in the InstantASP forum source code.  I'm trying to do the same with Presstopia but it errors out when putting the below in their web.config. <machineKey validationKey="..." decryptionKey="..." validation="SHA1" decryption="3DES" />So what did InstantASP have to do to make their 1.1 code able to use machinekey then if it's not a .NET 2.0 application?  I want to do the same for Presstopia.   I figure there are general things you can do to allow a 1.1 app to make it able to ...

.Net Web Forms
what is the best way to create a multi-page web insurance quote form (similar to Geico) that will insert information into a database? The examples i've seen show one form with a submit button at the bottom. I need to break this form into at least three different aspx or ascx pages. Thanks for the help. I did something similiar since I have like 7 sections to an application. The way I did it was by using the asp:panel control. When the user finished one section and clicks a button it inputs the data into the database and hides the 1st panel and shows the next one. HTH...

Could PB .NET Web Form POST security Information to others web page??
This is a multi-part message in MIME format. ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Hi,=20 Have anyone came across the requesion to POST security informations from = PB .NET web form web page to other web site?? I have tried many datys, Could any kind man give me some suggessions?? thanks & Best regards Leon ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/html; charset="big5" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML P...

Web resources about - How to make description short ... -

Resource Description Framework - Wikipedia, the free encyclopedia
is similar to classic conceptual modeling approaches such as entity-relationship or class diagrams , as it is based upon the idea of making statements ...

‘Impressum’ Added To Facebook Page Descriptions For Some Pages In Italy?
... are being prompted to add an “impressum” — or a legally mandated statement of the ownership and authorship of a document — to their page descriptions. ...

In the recent transition, the Scripting News feed lost its descriptions. Fixed. ;-)
In the latest transition on "Scripting News" a bug appeared that caused my feed to lose its descriptions on new posts. This has now been fixed. ...

META Description - Flickr - Photo Sharing!

The Aristocats Everybody wants to be a Cat with lyrics in description - YouTube
Skat Cat: Well, little lady, let me illusidate here Everybody wants to be a cat Because a cat's the only cat Who knows were it's at Tom: Tell ...

Glenn O’Brien’s Ideal Job Description
It takes flair and a certain amount of years in the media business to execute the following maneuver , during an informal job interview, with ...

A good description
A good, personal description of one form of what we put under the umbrella label of "depression": Having anxiety & depression is like being ...

The NYT description of NYC in August quotes "The Great Gatsby."
From "New York Today: Empty City" : But in the winding-down of summer, the city moves at a slower pace, and the lazy days of August can be quite ...

An Angel Investor's Job Description
Being an angel investor has a certain cache. You’re sought after by entrepreneurs and assess the value of their ideas. You choose whether or ...

This Neural Network's Hilariously Bad Image Descriptions Are Still Advanced AI
When will a neural network know who Donald Trump is? How long until one can come up with a joke on its own? How about recognize Yoda? Read more... ...

Resources last updated: 12/26/2015 2:46:29 PM