Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Tuesday, December 23, 2008

Modifying DataBound Hyperlinks Text

Modifying a GridView's Databound Hyperlink text since I couldn't do this easily in the ItemTemplate, I moved the Replace function to the DataBound of the GridView:


protected void GridViewStocksInLists_DataBound(object sender, EventArgs e)
{
int rowId;
string imgUrl;
string navUrl;
for (rowId=0; rowId<GridViewStocksInLists.Rows.Count;rowId++) {
imgUrl = string.Empty;
navUrl = string.Empty;
imgUrl = ((HyperLink)GridViewStocksInLists.Rows[rowId].FindControl("hlChart")).ImageUrl.Replace('$', '^');
((HyperLink)GridViewStocksInLists.Rows[rowId].FindControl("hlChart")).ImageUrl = imgUrl;
navUrl = ((HyperLink)GridViewStocksInLists.Rows[rowId].FindControl("hlChart")).NavigateUrl.Replace('$', '^');
((HyperLink)GridViewStocksInLists.Rows[rowId].FindControl("hlChart")).NavigateUrl = navUrl;
}
}
This replaced $ with ^ in my HyperLink.

Here is the GridView that contains the HyperLink:

<asp:GridView ID="GridViewStocksInLists" runat="server" DataSourceID="SqlDataSourceGetStocksInList">
<RowStyle CssClass="tableAnalysisRow" />
<HeaderStyle CssClass="tableAnalysisHeader" />
<AlternatingRowStyle CssClass="tableAnalysisAlternatingRow" />
<Columns>
<asp:TemplateField HeaderText="Chart">
<ItemTemplate>
<asp:HyperLink ID="hlChart" runat="server"
ImageUrl='<%# Eval("Symbol", "http://chart.finance.yahoo.com/c/0b/d/{0}").ToLower() %>'
NavigateUrl='<%# Eval("Symbol", "http://finance.yahoo.com/q/bc?s={0}&t=1y").ToLower() %>' >
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

References: http://forums.asp.net/p/1263726/2542303.aspx#2542303

52 comments:

Anonymous said...

hi friends. I'm actually into shoes and I was looking allowing for regarding that particular model. The prices seeking the shoes are about 330 dollars everwhere. But finally I base this site selling them as a remedy for half price. I exceptionally want those [url=http://www.shoesempire.com]prada sneakers[/url]. I will definetly purchase those. what can you say about it?

Anonymous said...

good afternoon bros. I'm really into shoes and I have been digging for the sake of that singular model. The prices for the sneakers are about 230 pounds everwhere. But for all I found this site selling them for the benefit of half price. I exceptionally love those [url=http://www.shoesempire.com]prada sneakers[/url]. I will definetly purchase these. what do you think?

Anonymous said...

good evening dudes. I'm actually into shoes and I have been digging allowing for regarding that meticulous brand. The prices as regards the velcros were approximately 350 pounds on every site. But definitively I found this locate selling them for the benefit of half price. I absolutely love these [url=http://www.shoesempire.com]gucci sneakers[/url]. I will definetly purchase these. what can you say about it?

Anonymous said...

good day dudes. I'm actually into shoes and I was looking for the sake of that exact brand. The prices as regards the shoes were all over 340 bucks on every site. But for all I bring about this location selling them for half price. I in reality love these [url=http://www.shoesempire.com]gucci sneakers[/url]. I will absolutely purchase those. what can you say about it?

Anonymous said...

After I originally left a comment I seem to have clicked the -Notify me when new comments
are added- checkbox and now each time a comment is added I recieve
4 emails with the exact same comment. Perhaps there is a
way you are able to remove me from that service?
Cheers!
Visit my weblog Canada Goose outlet

Anonymous said...

you're in reality a excellent webmaster. The web site loading speed is incredible. It seems that you are doing any distinctive trick. Furthermore, The contents are masterpiece. you've performed a great job in this matter!
Feel free to visit my blog - canada goose online

Anonymous said...

It's awesome in favor of me to have a web site, which is helpful in support of my know-how. thanks admin
my website - reportacrook.com

Anonymous said...

My programmer is trying to convince me to move to .net from PHP.
I have always disliked the idea because of the costs.
But he's tryiong none the less. I've been using Movable-type on a variety of
websites for about a year and am concerned about switching to
another platform. I have heard very good things about blogengine.
net. Is there a way I can import all my wordpress content into it?
Any help would be really appreciated!
Feel free to surf my site - nfl jerseys

Anonymous said...

Hi Dear, are you really visiting this web page on a regular basis,
if so after that you will without doubt take nice knowledge.
Also visit my webpage : www.nfljerseyswholesale49.com

Anonymous said...

If you desire to take a great deal from this article then you have to
apply these strategies to your won website.
Also visit my website customnfljerseysvip.com

Anonymous said...

When some one searches for his vital thing, thus he/she desires to be available that in detail, therefore that thing is maintained over here.
Also see my website > christian louboutin shoes

Anonymous said...

Right now it sounds like Movable Type is the top blogging platform
available right now. (from what I've read) Is that what you are using on your blog?
My weblog ; http://www.nfljerseyswhosalevip.com

Anonymous said...

Hey there terrific website! Does running a blog like this take
a massive amount work? I've absolutely no knowledge of programming but I was hoping to start my own blog in the near future. Anyhow, should you have any suggestions or techniques for new blog owners please share. I understand this is off topic but I simply had to ask. Many thanks!
My web-site ... www.cheapnikenfljerseys-usa.com

Anonymous said...

Usually I do not read article on blogs, however I wish to say that this write-up very forced me to try and do so!
Your writing taste has been surprised me. Thanks, very nice post.
My web-site ; www.cheapnfljerseys-vips.com

Anonymous said...

7yNwa ghd hair straighteners
sVsh ugg sale
hAlb michael kors handbags
4iOgf GHD Australia
2qYet burberry bags
6oWdq ugg australia
4nPce ghd hair straighteners
6tQyc louis vuitton shoes
9yWhu michael kors handbags
5hTeq ghd hair
2lZil cheap ugg boots
8nNtm wholesale nfl jerseys
6bEmv michael kors handbags
9yAgu ghd france
0fEaq ugg boots

Anonymous said...

euro purchase klonopin - purchase klonopin online no prescription http://www.klonopinsaleonline.com/#purchase-klonopin-online-no-prescription , [url=http://www.klonopinsaleonline.com/#klonopin-sale ]klonopin sale [/url]

Anonymous said...

hello buy diflucan - fluconazole 150mg http://www.diflucanbestprice.net/#fluconazole-150mg , [url=http://www.diflucanbestprice.net/#diflucan-cost ]diflucan cost [/url]

Anonymous said...

Hi, buy diazepam - buy valium online http://www.9oul.com/, [url=http://www.9oul.com/]diazepam 5mg[/url]

Anonymous said...

Hi, nexium without prescription - discount nexium http://www.wolverinefoodandspirits.com/, [url=http://www.wolverinefoodandspirits.com/]cheap nexium[/url]

Anonymous said...

Unquestionably believe that which you said. Your favorite justification seemed to be on
the web the simplest thing to be aware of. I say to you, I definitely get annoyed while people consider worries that they plainly don't know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side effect , people could take a signal. Will likely be back to get more. Thanks

Take a look at my web blog ... ロレックスコピー

Anonymous said...

I'm really enjoying the design and layout of your blog. It's a
very easy on the eyes which makes it much
more pleasant for me to come here and visit more often. Did you hire
out a designer to create your theme? Excellent work!

Here is my blog post; スーパーコピー時計

Anonymous said...

Thank you for the good writeup. It in fact was a amusement account it.
Look advanced to far added agreeable from you!

However, how can we communicate?

My web blog; www.2013chloeoutletshop.com

Anonymous said...

I would like to thnkx for the efforts you have put in
writing this website. I am hoping the same high-grade web site post from you in the upcoming
as well. Actually your creative writing skills has inspired
me to get my own website now. Really the blogging is
spreading its wings quickly. Your write up is a good example of it.


Here is my web site :: クロエ バッグ

Anonymous said...

Not crappy when we become shopping for golf shoes, still pricey though.
The iPod has changed our dwells in a number of
ways. Nowadays, there are other styles sports shoe in the community.
Follow your local Nike Store on Twitting for launch reports and
frequent fresh news. http://folkpedia.folkchata.pl/wiki/U%C5%BCytkownik:VickiLeav

Also visit my page ... air max 90

Anonymous said...

This comes about handy if locate yourself short of one's energy. On the other hand, they can return some other starting point enjoy themselves. Le., and UGG Australia was purchased by way of Deckers Outdoor Companie (1995). They start to now come living in a wide range of colors. http://www.no-milk-today.de/index.php?title=Benutzer:EmoryBlai

my page: white air max

Anonymous said...

Both stress flexibility, functionality and style and design.
You can furthermore , recharge the electrical battery with the help you to of a energy adapter.
But a family feud, led these two brothers to
separated out up, and Puma was born. Let us see if you'll separate the pair of at the apply. http://www.premiertaxfree.com/index.php/member/87799/

Take a look at my homepage; women air max

Anonymous said...

Who doesn utilize an actual couple nike athletic shoes?
Change becomes merriment and exciting, and simply you learn to actually actually welcome it.
All the significant company is surely a really smash hit this required Cannes by way of tornado.
the Nike Zoom, or you can decide the more existing design Nike Dunks.
http://pozdrowienie.pl/profile.php?mode=viewprofile&u=9624&sid=fb75da3df3fbe2f3fc0ad756ffe4b83a

Feel free to visit my homepage :: nike air max 95

Anonymous said...

Now we'll obtain a look near the Kindle Fire specifications to visit how it retains up. However, those most popular at least one is the nike shoes. For numerous of us, idea of change has the ability to send us appropriate into a panic attack. Their choices of to be able to wear are also expanding. http://unoubeya.main.jp/e_palm/tb.cgi?__mode=list&tb_id=20050224F

Anonymous said...

Nike has the Nike Zoom Advanced, very nice shoe with all the
entire features Nike has got. Gradually, Nike sandals have become these comfortable shoes men like to wear.
Alternatively hand, some belonging to the SB Dunks consider
released in Maui ahead of release in America. Historically, you understand several such circumstances attributable to Nike.
http://www.turtle.or.jp/cgi-bin/aska.pl

Anonymous said...

Nowadays, there are range styles sports runners in the showcase.
Does the activity call additional traction, more ventilation, more
insulation greater support? Between I-J, one can
see patterns even with often the naked eye. Leon Levin sells
them in fat white, we surely as, other numerous colors.
http://rezax123.com/profile.php?id=57259

Anonymous said...

Consequently, they want take pleasure in themselves with led packs.
in addition, more affordable sound rubber and also a herring bone
for added support. You can way too recharge the battery with the help you to
of a might adapter. Most of the approach has got mixed response during the users.
http://lawyerclub.ir/MontyVxq/tab:info

Anonymous said...

Follow your local Nike Store on Twitting for launch posters and frequent posts.
So does it offer you what its competitors undertake? Now we all know you are you will find what the difference between the two is definitely.
Yes, we've quickly become a nation of walking billboards. http://teamjonas.com.br/groups/of-various-nike-shox-tl3-shoes/

Anonymous said...

The price is the actual staggering $50.00
greater compared to Nike's equivalent, a enormous $249.00. State-of-the-art designs, trusted brand, good, sound production. Think of some sort of nike swoosh also the Toyota indication. Despite its cheap price, it defies i would say the expectation of searching or feeling discounted. http://development.colnotion.com/profile-16957/info/

Anonymous said...

These Clarity- A certainly cut and clear gemstone is the next hallmark of
a priceless piece. The young star, Jill McGill sports her outfits.

Through normal eye we all unable to see any defects.
Nike's shoes and shoes are a touch more expensive than that of those other brands. http://forum.cfar.org/profile.php?mode=viewprofile&u=8162

My webpage black nike air max

Anonymous said...

A good corporate will tailor you are security plan to assist you the needs involved with
you and your family. In the you are using these accounts, your rating will turn out
up quickly. Especially if in case you are returning to become lost.
San francisco and Bay A place people should in fact be looking to the heavens this evening.
http://aillcuramach.de/aillcuramachforum/profile.
php?mode=viewprofile&u=27327

Anonymous said...

What's up to all, how is the whole thing, I think every one is getting more from this web site, and your views are fastidious in support of new visitors.

my web blog; http://beaconrolexwatchs.wordpress.com

Anonymous said...

これらが発生するまたは実際にを超えて行くANSI 安全ガイドライン。

Check out my blog post: オークリーゴーグル

Anonymous said...

Typically be obsessed by working with perfectionism.
It is quite disturbing consulting a dog so is endlessly uncovering
his skin. Hoenn championship in conclusion concludes, revealing Tyson as the World
cup Victor. We can do things to improve our ability believe and reason.
http://wiki.kineticsfoundation.org/mediawiki/index.
php?title=User:ChadZas

My web page: long island

Anonymous said...

She designed everything straight from dresses and hats to perfume.

Seeking years later, Hyden-Dombeck began coaching blizards dancing in Colorado Springs.
Here are some suggestions regarding how you
can store your garments by going to folk-inspired items and ideas.
Close your eyes in addition to the take your time remembering.

http://demo.scritterscript.com/IsraelMoss

Anonymous said...

SGST on imports should also prove to be levied and accrued by the centre.
People from france probably has more artists per household than any some civilized country.
This is the essential significance of cash flow management.
Amy Adams were all smiles when she posed for shutterbugs at the growth.

http://telegnt.com/search.php?q=Copy+Patek+Philippe+Wataches+Related+Articles&page=1

Anonymous said...

I've been browsing online more than 3 hours today, yet I never found any interesting article like yours. It's pretty worth enough for me.
In my opinion, if all site owners and bloggers made good content as you did, the internet will be a lot more useful than
ever before.

Here is my homepage - トリーバーチ

Anonymous said...

My spouse and I absolutely love your blog and find the majority of your post's to be exactly what I'm looking for.

Do you offer guest writers to write content available for you?
I wouldn't mind producing a post or elaborating on a number of the subjects you write with regards to here. Again, awesome weblog!

my blog post :: http://rueeverslest.com

Anonymous said...

Why visitors still make use of to read news papers when in
this technological world the whole thing is existing on web?


Here is my blog ミュウミュウ新作

Anonymous said...

Cyrstal glass bottles were plus a stylish part of ancient perfume history.
It may will also be basd concerning a Goliath Frog because of
unique massive size. If you're interested in understanding how will be batch that we get for a Virgo, read the Virgo horoscope. A partial anagram of pulse may well also be present in the device's name.
http://hotrod.mdowdell.com/modules.php?name=Your_Account&op=userinfo&username=SolBounds

Anonymous said...

Whether you will need it or not, change is inevitable.
It is specific cut that specifies the way diamonds reflects under the source of light.
They attain a great wide range of shoes and sneakers suited for the people sports.
You'll find nothing complicated in discovering how it works. http://www.mirbase.org/wiki/index.php/User:JodiStran

my blog post ... shoes air max

Anonymous said...

Well there you have it folks, a good brief comparison of the two sports shoe brands.

Fine, look at other simplistic crazes nike Dunk SB commands.
Think of its nike swoosh in addition , the Toyota small. Believe it or not, these selfsame item can be
found off the internet for just $8.99. http://utilitywiki.
com/index.php/User:Abel3602

Anonymous said...

Its content material is man-made buff overlays when considering strategic support.
You can always recharge the electric power with the help of a might adapter.

The best way would you judge the quality linked any electronic kit?
T-shirts no longer hope giving others often the silent treatment.
http://www.ischile.cl/modules.php?name=Your_Account&op=userinfo&username=DelorisPa

Anonymous said...

An individual has just got within order to keep your manner open and keep in mind what to look
for. You have been linked into a rear ended accident.
The bags capability as part of prices from $800 to
over $1000 for most themes. http://definicaodigital.
blogspot.fr/2010/03/need-for-speed-wold-online-closed-beta.
html

Anonymous said...

Blogger: Programming Journal C#, Java, SQL - Post a Comment [url=http://www.buyingprovigilcheap.net/]order modafinil online [/url] generic modafinil - provigil online pharmacy no prescription - buy generic provigil online - http://www.buyingprovigilcheap.net/ [url=http://www.acompliadietpillonsale.net/]buy acomplia no prescription [/url] acomplia price - acomplia weight loss - order acomplia online - http://www.acompliadietpillonsale.net/ [url=http://www.cymbaltarxbuyonline.net/] Cheap Cymbalta [/url] cheap cymbalta - Cheap Cymbalta - generic cymbalta [url=http://www.acompliadietpillonsale.net/]acomplia no prescription [/url] generic rimonabant - where can i buy acomplia online - buy generic acomplia - http://www.acompliadietpillonsale.net/

Anonymous said...

ルイヴィトン キーケース
http://goldwing-girls.ru/forum/index.php?topic=188127.new#new
http://nlp.gerthjan.nl/viewtopic.php?f=5&t=146341
http://lotgdforum.arcadewelten.eu/viewtopic.php?f=23&t=38293
http://www.nodejsforum.de/erste-schritte-f4/topic62899.html
http://forum.creativegamers.net/viewtopic.php?f=5&t=20648
http://democraciad.zobyhost.com/foro/viewtopic.php?f=11&t=18560
http://forum.iniels.nl/viewtopic.php?f=5&t=621411
http://www.naturalnekosmetyki.co/index.php?topic=543219.new#new
http://www.cantaysuspueblos.com/forum/viewtopic.php?f=9&t=124956
http://mainerant.com/mer/viewtopic.php?f=4&t=258514

Anonymous said...

Title paul smith is identifiable to loud and attention
catching apparel, especially for women. Take help of their supervisors
to build a well drafted writing. It will each take place at the Freemasons' Hall, Covent Garden, over London. All these essentials pose as fantastic inconvenience to a shopper. http://www.lasciatecirespirare.it/modules.php?name=Your_Account&op=userinfo&username=Patrice59

Anonymous said...

And they also make our play both possible and pleasurable.
My friend was particularly adamant about the whiteness of his cravats.
Rimmel will prove to be on the avenues of London taking trendsetting looks located on the big day.
Do you need to organise re-training for your office workers?
http://acampadadespi.org/wiki/index.php?title=The_Anxiety_And_Its_Influence_On_Working_People_Including_Call_Center