Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8827373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:21:21+00:00 2026-06-14T07:21:21+00:00

I face the following problem : when I set my sessions in my aspx

  • 0

I face the following problem :

when I set my sessions in my aspx according to my requirements like this :

<Columns>
<asp:TemplateField ItemStyle-Width="10px">
<ItemTemplate>
<a id="btnShowPopup5" runat="server" class="thickbox" href='<%#"PopUp.aspx?AR=2"+"&TBiframe=true&height=530&width=750"%>'
<asp:Image ID="Image23" runat="server" ToolTip="Back" ImageUrl="Images/cross.png" /></a>
<asp:HiddenField ID="HDN_TaskCode" Value='<%# Session["s_TaskCode"] = DataBinder.Eval(Container.DataItem, "TaskCode") %>'
runat="server" />

I note that : Session["s_TaskCode"] was set always with the first row task code value in the gridview!!

and this’s not what i want.

I want to set my sessions according to the rows .

say my gridview has two rows :

  • The first task_code value is 7
  • The second task_code value is 10

I want to set the session with the correct value according to the hyper link i click on .

Like data keys.

Note : i want to set my sessions in the .aspx not .cs .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:21:22+00:00Added an answer on June 14, 2026 at 7:21 am

    You have using only one Session Variable (Session["s_TaskCode"]) in your code. So, how can you retain multiple values in it. It will always contain the value last written to it.

    To store row-wise values in session, you have to do something like:

    Session["s_TaskCode" + rowIndex]

    Here, rowIndex is <%# Container.DataItemIndex %>

    So you can use like: <%# Session["s_TaskCode" + Container.DataItemIndex] %>

    Edit:

    Instead of session, why don’t you pass the value of TaskCode in the ‘btnShowPopup5’ href url QueryString parameters:

    href='<%#"PopUp.aspx?AR=2"+"&TBiframe=true&height=530&width=750&" + DataBinder.Eval(Container.DataItem, "TaskCode") %>'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I face the following problem in a cryptographical application: I have given a set
I face the following problem function book($memberid, $classid){ if (!book){ // update the db
Sometimes i face the following problem : string txt = con.Request.Params[Par_name].ToString();//the original par value
I face following problem with three20 photobrowser app : 1: Some time images are
im currently trying to connect CakePHP with ExtJs4 but i face the following problem:
I have the following problem. Consider the classes class face { virtual std::vector<ptr>& get_vertices(void)
I face the following problem : I encrypt my query string then encoding the
I face the following problem. I have two large tables with about 80.000 records
I face the following strange problem while using JFileChooser package sandbox; import java.io.File; import
I face the following problem. I use text editor to allow the user to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.