C# .NET - how do i store label value in datalist as session variables?

Asked By sea sky on 18-May-09 11:31 PM

I have webpage displaying data with datalist. I want to pass one of this data in datalist another webpage when i click hyperlink in this datalist. So the relevant data want to pass when i click.

datalist has some structures: eg

labelAnnouncement,labelName,labelMinistry,HyperlinkSelected and so on..When I click HyperlinkSelected I want to pass labelAnnouncement Value on another page. Please help my difficulties.

Santhosh N replied to sea sky on 19-May-09 12:14 AM

You could pass query strings as below for this instea od storing n session...

asp:DataList ID="dlst1" runat="server" > 

<ItemTemplate>

<a Href='<%#"page1.aspx?param="  + Eval("First") + %>' >View</a>

 </ItemTemplate>                
</asp:DataList>

This prodices page1.aspx?param=yourselectedAnnouncement

RE

Ravenet Rasaiyah replied to sea sky on 19-May-09 12:45 AM
Hi

To this you could use the Template with in the Datalit control

<asp:DataList id="DataList1" runat="server">
<HeaderTemplate>
About Delphi Programming
</HeaderTemplate>
<FooterTemplate>
<asp:HyperLink
id="HyperLink1"
runat="server"
navigateurl="http://delphi.about.com">
delphi.about.com
</asp:HyperLink>
</FooterTemplate>

Here more information
http://shalvinpd.blogspot.com/2008/02/aspnet-datalist-hyperlink-template.html

http://delphi.about.com/library/weekly/aa121305a.htm

thank you
</asp:DataList>