ASP.NET Substring

T

Tahir

hi,
i am programming a website using ASP.NET 2.0 and SQL 2005 and serving the
last five members via DataList containing a HyperLink like this code:
<asp:HyperLink ID="firmaHyperLink" runat="server" NavigateUrl='<%#
Eval("firmId", "~/Firma.aspx?firmId={0}") %>' Text='<%# Eval("name", "{0}")
%>' ></asp:HyperLink>
i have a problem that "name" variable may be too long so how can i substring
it? very glad if a sample code :)
 
C

Cowboy \(Gregory A. Beamer\)

You can always do the binding of this field in code behind using the Row
Data Binding event. This allows you to evaluate the value and do whatever
you want before binding it.

If that is not acceptable, you can bind back to a routine that does the work
for you. Just pass the entire Eval back to the routine.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top