Solved

Using the operator ~ asp.net in Client Elements.

Posted on 2007-03-30
5
1,149 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Iteration Help (Asp.net VB) 5 36
VB.net Use code to open two DateTimePickers at the same time 7 44
SSIS GUID Variable 2 31
Header Font Size in Grid View 6 23
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

762 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