Question about Computers & Internet

1 Answer

I'm a Fresher in ASP.NET 2.0, Please help me

<%#System .Web.HttpUtility.HtmlEncode(Mid(DataBinder.Eval(Container.DataItem,"description"),1,20)) + "....." %>

What's wrong with the above code, What I want is that while displaying the "description" column of the database on the Repeator , It should display only 20 characters. But the whole data should save on the Data Base.
Here Every thing is working fine except the above code, I want only 20 characters only to be displayed on Repeator.

I don't know whether you understand what i mean, I will try to make to understand more by an example !
when we work on SQL Query analyser , when we type
Select * from tablename
Then the whole datas in each columns of the Table will get displayed.
suppose if we have a column named "description" , and that column have
huge amount of text datas then , it won't show the whole data on Query Analyser while we type the select Query.
After displaying some specific number of characters it will show "........."
ACTUALLY THAT FUNCTIONALITY IS THE ONE WHICH I WANT
that i want to display only specific number of characters in Repeator control. here i want to display only 20 characters.
CAN YOU PLEASE HELP ME
RESPOND QUICKLY

masterprasad@rediff.com
PRASAD

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

You need to change the column type from BoundField to TemplateField and call the substring method like this

<asp:TemplateField>
<HeaderTemplate>
Comments
</HeaderTemplate>
<ItemTemplate>
<%#Eval("Comments").ToString().Substring(0, 25)%>
</ItemTemplate>
</asp:TemplateField>
In this snippet, I am displaying only the first 25 characters of the Comments field.Only problem with this approach is that if even one of the rows contains a comments field with less than 25 characters, this might trigger an error.The fool proof way then is to write a small function in codebehind which will check the length of the field, chop off any extra characters and in case of shorter strings,

( THANKING " Balgates " For this HELP )

Posted on May 05, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Can not install Net Framewoek 3.0 because of


Sir,

Run the cleanup tool to clean out temporary files, run the .NET
Framework cleanup tool, Run the installation file, then reboot and try to install it again and see if it works. If not try the below following steps....

Step One:
1. Go to Add or Remove Programs, try to remove all .NET Framework.
2. Please download and install the Windows Installer Cleanup utility
from this link:
http://download.microsoft.com/downlo...BD/msicuu2.exe
3. Then, please run it from Start-> All Programs-> Windows Install
Clean Up.
4. Please remove all Microsoft .NET Framework shown there and click
Remove.
Step Two:
1. Click Start->Run, type INSTALLER and click OK.
2. In the open folder, click View menu and select Details.
3. Right-click the Date Modified column header.
4. Click Comments
5. In the Comments column, locate the cached Windows Installer file
that displays Microsoft .NET Framework 1.1 (English) RTL x86 enu.
6. Right-click the cached Windows Installer file and then click
Uninstall.
7. Close the window.
8. Delete the cached Windows Installer file.
Step Three:
1. Restart your computer.
2. While your computer is booting up, press F8 to invoke the startup
menu.
3. In the startup menu, choose Safe Mode.
4. Log on as an administrator.
Note: In Safe Mode, your system display and Desktop will look and
perform differently than in Normal Mode. This is only temporary.
5. Delete the folder C:\WINDOWS\Microsoft.NET
6. Delete the folder C:\WINDOWS\system32\URTTemp
7. In the C:\Windows\System32 folder, locate the file mscoree.dll.
Right click and rename it to mscoree.old
Step Four:
1. Click Start->Run, type REGEDIT and click OK.
2. Navigate to the following registry key by expanding the "+" beside
the registry tree in the left pane:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
3. Delete this key in the left pane.
4. Repeat steps 2-3 to delete the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup
5. Restart your computer to Normal Mode
Step Five:
1. Please download the Microsoft .NET Framework Version 1.1
Redistributable Package from the following link and save it to C:
http://www.microsoft.com/downloads/d...DisplayLang=en
2. Click Start->Run, type "c:\dotnetfx.exe /C" (without quotation marks
and there is a space in this command) in the open box and click OK.
3. Click Run, and type "C:\.NET Framework 1.1" (without quotation
marks) in the open box click OK
Note: If you are prompted to create this folder, please click Yes to
continue.
4. Locate the folder C:\.NET Framework 1.1 and double click the file
netfx.msi in it to install .NET Framework components.
If .NET Framework 1.1 can be successfully installed, we can go on to
install .NET Framework 1.1 Service Pack 1:
Microsoft .NET Framework 1.1 Service Pack 1
http://www.microsoft.com/downloads/d...DisplayLang=en
Step Six:
If the above two can be installed correctly, please download KB886903
from the following link and install again:
http://www.microsoft.com/downloads/d...displaylang=en
If the problem still exists, please describe the error message when
installing Microsoft .Net Framework Service Pack in further detail


Thanks
Good luck

Nov 07, 2009 | Microsoft Computers & Internet

1 Answer

Asp.net 1.1 forms in IE 8.0


On the computers using IE8, click on Page -> Compatibility View Settings. In the dialog box, enter the domain of the website using your ASP.NET 1.1 pages and click on the Add button. Now, the pages will be rendered the same way they were with IE7 which should solve your issue.

Jul 10, 2009 | Microsoft Computers & Internet

2 Answers

Dvd cd rom doesn't work


To solve this Code 39 error, follow these instructions:
NOTE: After removing these registry keys and rebooting, it may be necessary to reinstall any CD or DVD recording applications.
1) Close all open programs
2) Click on Start, Run, and type REGEDIT and press Enter
3) Click on the plus signs (+) next to the following folders
  • HKEY_LOCAL_MACHINE
  • SYSTEM
  • CurrentControlSet
  • Control
  • Class
  • {4D36E965-E325-11CE-BFC1-08002BE10318}
4) This folder is the DVD/CD-ROM Drive Class Description in the registry. Look for any of the following names in the right hand column.
  • UpperFilters
  • LowerFilters
  • UpperFilters.bak
  • LowerFilters.bak
5) If any of the above keys shown in step 4 are listed, right-click on them and choose Delete

6) After deleting the keys, close the Registry Editor

7) Reboot your computer

8) Open My Computer and check to see if your CD or DVD drives have returned. You may also want to open Device Manager and verify that the yellow exclamation and error code on the CD or DVD drive is gone.

That should do it for you, good luck
please leave a rating, thankyou kindly

Apr 28, 2009 | Computers & Internet

1 Answer

Access 2000 forms and combo boxes


I could be getting confused with programming Languages, but here is a shot in the dark. You may have to code or give argument to each combo box that <when selected if (other box) is blank then update (other box)> or somthing similiar, MAYBE?????

Apr 03, 2009 | Microsoft Access 2000

1 Answer

Parser error


the Bin folder was not on the installation cd given by a provider
allow also webdav on IIS

Mar 19, 2009 | Polyvision RoomWizard Room Scheduling...

2 Answers

Please i want source code calculator using asp.net


i want the source code for simple calculater in asp.net

Mar 17, 2009 | Microsoft Computers & Internet

1 Answer

HOW CAN I USE Crystal report in asp.net


In visual studio 2005 or 2008 crystal reports is present inside so right click in the project and add new item and select crystal report(.rpt) and select the database samething like gridview connectivity and select the table select row and columns of the table now u r crystal report is ready

Mar 07, 2009 | ComponentOne WebReports For ASP.NET...

1 Answer

Wont turn on


yes they tell you if there is something wrong

Beep Code Descriptions Document

1 short DRAM refresh failure
2 short Parity circuit failure
3 short Base 64K RAM failure
4 short System timer failure
5 short Process failure
6 short Keyboard controller Gate A20 error
7 short Virtual mode exception error
8 short Display memory Read/Write test failure
9 short ROM BIOS checksum failure
10 short CMOS shutdown Read/Write error
11 short Cache Memory error
1 long, 3 short Conventional/Extended memory failure
1 long, 8 short Display/Retrace test failed

Sep 25, 2008 | Dell Dimension 5100 (D51L1) PC Desktop

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

179 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...