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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:21:52+00:00 2026-05-25T02:21:52+00:00

I have two pages Master page page using the master page I am opening

  • 0

I have two pages

  1. Master page
  2. page using the master page

I am opening a pop up using “window.open” in the second page.
I have textbox control in the second page and trying the find the control in the pop up page using below code.

window.opener.document.getElementById('textbox').value

This code could not found out the control.

Then I checked the page source of second form and dound out the format of control id. It was like below.

“_ctl0_ContentPlaceHolder1_textbox”

and changed the code to below and got success.
“window.opener.document.getElementById(‘_ctl0_ContentPlaceHolder1_textbox’).value”

My query is -> I am not about this approach. Please correct if i am doing anything wrong.

  • 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-25T02:21:52+00:00Added an answer on May 25, 2026 at 2:21 am

    With ASP.NET 4.0 you have the option to set ClientIDMode that could help you in this case.
    Setting ClientIDMode to “Static” will ensure that your ID value will not be altered by the framework.

    In your page where you have textbox:

    <asp:TextBox ID="MyTextBox" runat="server" ClientIDMode="Static" /> 
    

    Then you should be able to get the value by doing something like this:

    window.opener.document.getElementById('textbox').value
    

    Ref: MSDN – ClientIDMode

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

Sidebar

Related Questions

I have a user control in a master page with two drop down lists.
I had created a webpage using asp.net mvc3 razor. I have two master pages
I have two master pages and a content page. On my local machine this
I have a git repository (at github.com) with two branches: master and gh-pages. I
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
Ok, i have simple scenario: have two pages: login and welcome pages. im using
I have a master page that divides the main content into two areas. There
I am learning ASP.NET and I have a master-detail scenario using two GridViews in
In my application I have two Master pages and they are used in various

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.