Solved

Using the operator ~ asp.net in Client Elements.

Posted on 2007-03-30
5
1,146 Views
Last Modified: 2013-12-17
How can I use the operator ~ in Client Elements.

I need to use the operator ~ in client elements like is used in asp.net server controls.
By example :
1)      Writing javascript code:  parent.location.href('~/Pages/Test.aspx');
2)      body1.Style.Add("background-image", "url(~/imagens/back_logo_co.jpg)");

I was using Request.ApplicationPath but not worked.

Thanks for your help.
0
Comment
Question by:gonzalogn
  • 2
5 Comments
 
LVL 19

Expert Comment

by:mrwad99
ID: 18829450
Have a read of http://msdn2.microsoft.com/en-us/library/ms178116.aspx,.  This describes it all.

HTH
0
 
LVL 1

Author Comment

by:gonzalogn
ID: 18830026
Dear mrwad99,

The link is the same of Microsoft documentation help but not resolving my problem.

I found the solution myself,  the method ResolveClientUrl(“~”), but only works in .NET Framework version 2.0

The Microsoft documentation sometimes is difficult to find alternatives options.
By example: I was seeking the ~ asp.net operator and doesn’t have any link alternative documentation to find ResolveClientUrl or ResolveUrl.

Thanks anyway!
0
 
LVL 19

Expert Comment

by:mrwad99
ID: 18830173
OK, if you have found the solution, request refund of your points in community support :)
0
 

Accepted Solution

by:
AnnieMod earned 0 total points
ID: 19390431
PAQed with points refunded (125)

AnnieMod
Cleanup Admin
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question