Question about Compilers & Programming Tools

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

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

2 Answers

Definition of asp.net & .net frame work


ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites, web applications and web services


The Microsoft .NET Framework is a software framework that can be installed on computers running Microsoft Windows operating systems. It includes a large library of coded solutions to common programming problems and a virtual machine that manages the execution of programs written specifically for the framework. The .NET framework supports multiple programming languages in a manner that allows language interoperability, whereby each language can utilize code written in other languages; in particular, the .NET library is available to all the programming languages that .NET encompasses. The .NET Framework is a Microsoft offering and is intended to be used by most new applications created for the Windows platform.

Jun 02, 2010 | Microsoft ASP.NET Programming with MS...

2 Answers

What is .net? what are the types?


Hi,
.net is a platform which is used for creating standalone and web application. It is Microsoft technology and competitor of Java. .net is not a language but a framework and supports many languages. It supports around 37 languages. But mostly CSharp and vb.net is used for developing the application. Microsoft Visual Studio is used for developing .net applications.
Regards, polysandy

May 31, 2010 | Microsoft ASP.NET Programming with MS...

1 Answer

Please, i need vb source code on Islamic laws of inheritace


Salam...
This is the link to VB source code. http://www.a1vbcode.com/. However, there are different categories to choose from the sites and try one of these which one is suited for Islamic laws on Inheritance sharing file. There are three categories which I will recommend most probably are needed to open your search; VB net, asp net, active x and asp. Or perhaps, you need some other sources like Hadith or a fatwa to access to that subject. Thanks.

Dec 12, 2009 | Microsoft Visual Basic Enterprise Edition...

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 Compilers & Programming Tools

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 Compilers & Programming Tools

2 Answers

Free visual basic source code salary database sample


you solution is her



Building Websites with VB.NET and DotNetNuke 4/by Daniel N. Egan (Author), Steve Valenzuela (Author), Michael Washington (Author)
Description
DotNetNuke is an open-source Content Management System and web application framework. DotNetNuke has taken the Microsoft world by storm and now at version 4, its community has grown to over 200,000 users. This book covers virtually everything you need to know to get your DotNetNuke website up and running. Concisely written and with clear explanations, this book is covers installation, administration, deployment, site creation and all of the basic built in DotNetNuke modules. For developers, chapters on the core architecture, skinning and custom modules, including coverage of the DAL+, give you the skills to customize and extend your site. The book starts off by giving you a deep understanding of working with basic DotNetNuke sites, guiding you through the features and giving you the confidence to create and manage your site. After that, you will journey to the heart of DotNetNuke, and learn about its core architecture. Always concise, relevant and practical, you will find out what makes DotNetNuke tick, and from there, you will be ready to customize DotNetNuke. Developers will enjoy the detailed walkthrough of creating a new custom modules. Special emphasis is given to the DAL+, an extended feature set of the DotNetNuke Data Access Layer (DAL). You will see how to create custom modules with the DAL+, and invigorate your module development. Web designers will enjoy the material on skinning, helping them to create a new look for their site. You will learn about creating new skins, and packaging them up for easy deployment. You will master all of this as you leap into the development of a DotNetNuke 4 site. This book will give you the skills to create and manage DotNetNuke websites as quickly as possible. You will:
* Install and configure DotNetNuke
* Master the standard modules
* Understand the core architecture of DotNetNuke
* Explore the inner workings of DotNetNuke modules
* Extend DotNetNuke using the DAL and DAL+ to create powerful custom modules
* Create your own skin using a HTML Editor
* Find out about where and how to host and deploy your site
You can use this book to help you set up and administer a DotNetNuke portal, even if you have a limited knowledge of ASP.NET. You will learn how to setup and administer an example site, stepping through all the tasks to ease your learning. If you are a developer, this book will help you extend the DotNetNuke portal by first helping you understand how the core framework works and then show you how to create custom modules and skins. A rudimentary knowledge of VB.NET programming is assumed, but the emphasis is not on becoming a better VB.NET programmer but on taming DotNetNuke. This book has been written for both the beginner wanting to set up a website and also ASP.NET developers with a grasp of VB.NET who want a deeper understanding of how to work with DotNetNuke. To work with the DotNetNuke code, you will need access to Visual Web Developer Express or Visual Studio .NET 2005. No prior knowledge of DotNetNuke is assumed.

download link:
http://w14.easy-share.com/1701584071.html
or:
http://dep

May 03, 2009 | Microsoft Visual Basic Enterprise Edition...

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 Compilers & Programming Tools

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

Asp.Net


about the dynamic forms/pages, u can use sessions in asp.net C#, theyre very easy to use and try using commands like server.transfer and respond.redirect in ur code. for the connectivity thigee u asked, :) m sorry my friend u cant get it like a pan cake, u gotta study w3schools odbc connectivity in asp.net tag for this :P

Dec 21, 2008 | Microsoft ASP NET WEB MATRIX (583797)

Not finding what you are looking for?
Compilers & Programming Tools Logo

Related Topics:

179 people viewed this question

Ask a Question

Usually answered in minutes!

Top Compilers & Programming Tools Experts

Robin Hill
Robin Hill

Level 3 Expert

1251 Answers

Fred Block
Fred Block

Level 2 Expert

289 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18299 Answers

Are you a Compiler and Programming Tool Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...