Advertisement

05.12.2008 at 05:19AM PDT, ID: 23394243
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

calling .net variable from javascript

Tags: Javascript asp.net, ie7
Hi

What i'm trying to do is show an alert of a asp.net variable

in the aspx page i have this HTML
<a id="A1" runat="server" class="link" onclick="alert('The value is " & =MyVar & "'); return false" href="#" title="click">click</a>


then in the code behind i have this
        Dim  _MyVar  As String

        Public ReadOnly Property MyVar () As String
            Get
                Return _MyVar
            End Get
        End Property

in on page load i have this:
_MyVar = "This is the var"


however, this does not work
...the alert isn't what i'm trying to do, what i'm trying to do is call a JS function and pass in the .net variable, however, the alert is a simplified version so i can see it working

the above code doesn't work, and i've tried using this with no luck
onclick="alert(<%=MyVar() %>);"


any ideas?
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: paulCardiff
Solution Provided By: naspinski
Participating Experts: 2
Solution Grade: A
Views: 12
Translate:
Loading Advertisement...
05.12.2008 at 05:25AM PDT, ID: 21546212

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 05:50AM PDT, ID: 21546419

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 05:56AM PDT, ID: 21546464

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 05:59AM PDT, ID: 21546487

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 06:09AM PDT, ID: 21546581

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628