fosiul01
asked on
How to use Repeater Control and Session variable to pass value from page to page
Hi, Currently i am using repeater to show all the data from database. and when some one will click on data it will take to anohter page by using query string.
but is there any way to use Session with repeater control ?? ( i dont want to use query string for exposing data)
here currently i am using this code :
<asp:Repeater ID="Repeater2" runat="server" DataSourceID="ObjectDataSo urce2">
<HeaderTemplate><ul></Head erTemplate >
<ItemTemplate>
<li><a href="showknowledgecategor y.aspx?Id= <%# DataBinder.Eval (Container.DataItem, "catid") %>"><%#DataBinder.Eval(Con tainer.Dat aItem, "cat_Name")%></a></li>
</ItemTemplate>
<FooterTemplate></ul></Foo terTemplat e>
</asp:Repeater>
Thanks for advise
but is there any way to use Session with repeater control ?? ( i dont want to use query string for exposing data)
here currently i am using this code :
<asp:Repeater ID="Repeater2" runat="server" DataSourceID="ObjectDataSo
<HeaderTemplate><ul></Head
<ItemTemplate>
<li><a href="showknowledgecategor
</ItemTemplate>
<FooterTemplate></ul></Foo
</asp:Repeater>
Thanks for advise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think the best way is to trace the flow of the values in run-time.
ASKER
I have attached the code , here i am trying to get the session value in a textbox from another page
Problem is : i need to click 2 times to set the session value, dont know why
suppose : after running the programm -
when i am cliking on link1 , textbox is showing link1
now when i am clicking on link2 - text box is still showing link1
i will have to click on link2 again to set the session value for link2!!!!
why its happening ??
Open in new window