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 7069907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:30:10+00:00 2026-05-28T05:30:10+00:00

I have two pages. From the first page, I open a modal with a

  • 0

I have two pages. From the first page, I open a modal with a querystring that holds that value of a client name. I then use this to set a hiddenfield on the modal that opened.

I need a TextBox on the new modal to display the value that has been sent through from the first screen.

I’ve tried getting the value using:

var hv = $('hidClientField').val();`

But this doesn’t seem to work.

This is my hidden field:

<asp:HiddenField ID="hidClientName" runat="server" />`

I set it in the code behind on the Page_Load like this:

hidClientName.Value = Request.QueryString["Client_Name"] ?? "";`

Any ideas will be much appreciated.

  • 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-28T05:30:11+00:00Added an answer on May 28, 2026 at 5:30 am

    Try any of the following

    1. If ASP.Net control and javascript both are on same page, then use

      var hv = $("#"+ '<%= hidClientField.ClientID %>').val();
      
    2. If you want to access the control from some JS file, then

      // 'id$' will cause jQuery to search control whose ID ends with 'hidClientField'
      var hv = $('input[id$=hidClientField]').val();
      
    3. You can use class name selector to achieve same. Check out this similar question.

    In asp.net, controls id is mangled. Because of this your code is not working.

    Hope this works for you.

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

Sidebar

Related Questions

All, I basically have two identical pages from a coding perspective. The first page
I have two pages, on the first page after an event happens I change
Currently I have two pages: The first page contains an input form, and the
I have two subdomains www.example.com and api.example.com . On a page from first domain
I have a simple jQueryMobile index.html page. Within that I have two pages using
I have two html pages, when you click on something on the first html,
I have two repeaters that looks like this : Arrange By: Name | Age
I have a form where two fields on the first page of the form
Overview: I have two pages in my program; the main page and the other
I have two web pages- the first is a GridView and the second is

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.