Solved

Using the operator ~ asp.net in Client Elements.

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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)…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

914 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

12 Experts available now in Live!

Get 1:1 Help Now