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

  • Home
  • SEARCH
  • 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 265761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:47:52+00:00 2026-05-11T22:47:52+00:00

If my cookie is set like this: Response.Cookies(Employees)(UserID) = 43 How do I get

  • 0

If my cookie is set like this: Response.Cookies(“Employees”)(“UserID”) = 43

How do I get this value from within an ObjectDataSource SelectParameters CookieParameter?

<asp:ObjectDataSource ID="odsProducts" runat="server" TypeName="MyCompany.Products" SelectMethod="GetAll">
     <SelectParameters>
         <asp:CookieParameter CookieName="????" Name="UserID" Type="Int32" />
     </SelectParameters>        
</asp:ObjectDataSource>

I’m assuming that I would need to do something like this?

<asp:ObjectDataSource ID="odsProducts" runat="server" TypeName="MyCompany.Products" SelectMethod="GetAll">
     <SelectParameters>
         <asp:CookieParameter CookieName="Employees.UserID" Name="UserID" Type="Int32" />
     </SelectParameters>        
</asp:ObjectDataSource>
  • 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-05-11T22:47:52+00:00Added an answer on May 11, 2026 at 10:47 pm

    Not ideal, but you could set the ObjectDatasource’s Parameter DefaultValue in the code-behind
    odsProducts.SelectParameters[“UserId”].DefaultValue = Response.Cookies[“Employees”][“UserID”]

    there may be an syntax error in there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to store a cookie using something like Response.Cookies.Set(new HttpCookie(name,value); after I have
If I set cookies like this: $_SESSION[md5('ponies'.$salt)] = $value; so that only knowing the
After I get response from httpwebrequest, I'd like the cookies obtained to save for
I got this cookie returned from web-server in Set-Cookie header: PHPSESSID=462rutd8g0sbg9sinh3hqa2ol6; path=/,wordpress_test_cookie=WP+Cookie+check; path=/,wordpress_ca07030412dd7fcd4dbeaae0bd9f5df9=testemail@example.com; expires=Sun,
hello, how can i set cookies like 'last_visit' if the user have more than
In my Controller Action I set Cookie with Response.SetCookie(myCookie) method. In my Unit Test
I am trying to set a cookie in my Google App Engine page: self.response.headers.add_header('Set-Cookie','CookieName=1234;
I want to remove a cookie I set. If I do this by giving
I am using CURL for get response from an web api. I am getting
It's there a way to retrieve cookie value in ASHX Handler ? I set

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.