Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

ASP.NET Substring

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tahir - 29 Mar 2008 14:18 GMT
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 :)
Cowboy (Gregory A. Beamer) - 29 Mar 2008 15:10 GMT
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.

Signature

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!

*************************************************
> hi,
> i am programming a website using ASP.NET 2.0 and SQL 2005 and serving the
[quoted text clipped - 4 lines]
> i have a problem that "name" variable may be too long so how can i
> substring it?  very glad if a sample code :)

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.