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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:01:14+00:00 2026-06-15T08:01:14+00:00

I have one url in which i have to send the some property values.

  • 0

I have one url in which i have to send the some property values. My property like below

 public string MyValue
        {
            get { return MyValue; }
            set { MyValue = value; }
        }

Now I want to send this value as parameter to the url in window.open method in javascript.

window.open("../SearchPage/MySearch.aspx?MyValue=","left=20,top=20,width=500,height=500")
I tried to access in javascript like
'<%= MyValue %>".

But this is not coming. It is giving parser error. How to achieve this?

  • 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-15T08:01:17+00:00Added an answer on June 15, 2026 at 8:01 am

    If your JavaScript is located in a separate file, you can’t use <%= %> to define variable there, you should use hidden fields, cookies and similar stuff

    But if you could put js in aspx page, it should work

    <head runat="server">
        <title></title>
        <script type="text/javascript">
            alert('<%= MyProperty %>');
        </script>
    </head>
    

    This works for me, where MyProperty is public string property in my aspx page, please make sure that you put quotes correctly

    EDIT

    Here is my page be

    public partial class WebForm1 : System.Web.UI.Page
    {
        public string MyProperty { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            MyProperty = "aaaaaaaaa";
        }
    }
    

    EDIT

    BTW

    public string MyValue
    {
        get { return MyValue; }
        set { MyValue = value; }
    }
    

    is not will cause StackOverflowException on set, you should create private variable for storing value 🙂

    private string _myValue;
    public string MyValue
    {
        get { return _myValue; }
        set { _myValue = value; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's suppose I have xml like this one: <Server Active=No> <Url>http://some.url</Url> </Server> C# class
I am using below URL to show line chart but one thing I have
I have a client which connects to a Web service to get some information.
I have a done a project in which data like name, url, desc are
I have to call a remote service which expects me to send some parameters
I have one million URL list to fetch. I use this list as nutch
I have a scenario where a user will have access to a one-time-url. When
I have two URLs: One is the application URL = http://domain.com/app One is the
If you have a url such as the one as follows: http://www.example.com/400x200 is it
I'm using Paperclip and have a default_url option like this for one of my

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.