To: "Community of ASP.NET 2.0" <aspnet-lcnetwork@dotnet.itags.org.googlegroups.com>
Subject: NEWBIE needs help for creating links
Date: Sat, 24 Dec 2005 17:42:34 -0800
Hi :
Firstly, i am sorry for stealing your time for this easy problem of
mine, but i crashed.
I have a datalist, and i show a small pic and a little about the news,
in it. There is a details link at bottom. I want to carry the news_id
and news_category informations to details page, but i could not ! As a
summary i need this kind of thing :
http://www.mysite.com/newsdetails.a...category=health
I have used an 'asp :Hyperlink' but for databound method of this item,
i could only carry news_id. How can i carry more? Which tool to choose,
and how?
By the way i am an VisualStudio 2005 (Rel.Can) user.
Thanks for your helps.
Best RegardsTry either one of the following, either one should work:
<asp:HyperLink id="lnknewsdetails" runat="server" Text="Details For This
Article" NavigateUrl='<%# "http://www.mysite.com/newsdetails.aspx?news_id="
& Server.UrlEncode(Container.DataItem.news_id) & "&news_category=" &
Server.UrlEncode(Container.DataItem.news_category) %>'
<asp:HyperLink id="lnknewsdetails" runat="server" Text="Details For This
Article" NavigateUrl='<%#
String.Format("http://www.mysite.com/newsdetails.aspx?news_id={0}&news_category={1}",
Server.UrlEncode(Container.DataItem.news_id),
Server.UrlEncode(Container.DataItem.news_category) ) %>'
Good Luck!
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/
"Enes Kabacaoglu" <eneskbc@.gmail.com> wrote in message
news:1135475065.426723.31940@.z14g2000cwz.googlegro ups.com...
> From: "Enes Kabacaoglu" <eneskbc@.gmail.com>
> To: "Community of ASP.NET 2.0" <aspnet-lcnetwork@.googlegroups.com>
> Subject: NEWBIE needs help for creating links
> Date: Sat, 24 Dec 2005 17:42:34 -0800
> Hi :
> Firstly, i am sorry for stealing your time for this easy problem of
> mine, but i crashed.
> I have a datalist, and i show a small pic and a little about the news,
> in it. There is a details link at bottom. I want to carry the news_id
> and news_category informations to details page, but i could not ! As a
> summary i need this kind of thing :
> http://www.mysite.com/newsdetails.a...category=health
> I have used an 'asp :Hyperlink' but for databound method of this item,
> i could only carry news_id. How can i carry more? Which tool to choose,
> and how?
> By the way i am an VisualStudio 2005 (Rel.Can) user.
> Thanks for your helps.
> Best Regards
0 comments:
Post a Comment