Solved

Using the operator ~ asp.net in Client Elements.

Posted on 2007-03-30
5
1,144 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now