473,322 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Mapping a Url Using ~

I need to generate client-side JavaScript from server-side ASPX. I have no
trouble doing that but in the JavaScript I generate, I need to refer to a Url
of another page on the site when doing JavaScript that pops a window
(window.open()).

In the server side code, I want to be able to convert a Url which contains a
"~" into a Url which I can then insert into the client-side JavaScript. What
function can I use to dynamically convert a path which contains a "~" into a
path that can be used from the client? This must be possible because it's
what controls like the server-side IMG tag use for their Src property.

Thanks.
May 6 '06 #1
2 1076
Control.ResolveClientUrl (also Page.ResolveClientUrl) is the helper API in
2.0 for this.

-Brock
http://staff.develop.com/ballen

I need to generate client-side JavaScript from server-side ASPX. I
have no trouble doing that but in the JavaScript I generate, I need to
refer to a Url of another page on the site when doing JavaScript that
pops a window (window.open()).

In the server side code, I want to be able to convert a Url which
contains a "~" into a Url which I can then insert into the client-side
JavaScript. What function can I use to dynamically convert a path
which contains a "~" into a path that can be used from the client?
This must be possible because it's what controls like the server-side
IMG tag use for their Src property.

Thanks.

May 6 '06 #2
SHWEET! Thanks.

"Brock Allen" wrote:
Control.ResolveClientUrl (also Page.ResolveClientUrl) is the helper API in
2.0 for this.

-Brock
http://staff.develop.com/ballen

I need to generate client-side JavaScript from server-side ASPX. I
have no trouble doing that but in the JavaScript I generate, I need to
refer to a Url of another page on the site when doing JavaScript that
pops a window (window.open()).

In the server side code, I want to be able to convert a Url which
contains a "~" into a Url which I can then insert into the client-side
JavaScript. What function can I use to dynamically convert a path
which contains a "~" into a path that can be used from the client?
This must be possible because it's what controls like the server-side
IMG tag use for their Src property.

Thanks.


May 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Pierre Fortin | last post by:
Hi! "Python Essential Reference" - 2nd Ed, on P. 47 states that a string format can include "*" for a field width (no restrictions noted); yet... >>> "%*d" % (6,2) # works as expected ' ...
0
by: Chris | last post by:
I am using Castor to marshal and unmharshal some objects. I have an object that has a List of strings. I can marshal it without using a mapping file. However, when I try to unmarshal it without...
6
by: naruto | last post by:
Hi all, I have the following being defined in a A.cxx file. // define in source file. Not exported to the outside world (this cannot be // moved to the header file ) #define CHANNEL_0 0...
1
by: Tamas Hegedus | last post by:
Hi! I am looking for an xml-object mapping tool ('XML Data Binding-design time product') where I can define the mapping rules in 'binding files' and the parser is generated automatically. ...
1
by: CV | last post by:
Hello, Could anyone please throw your suggestions on the following scenario? (It would be really helpful if you could provide a solution using ..NET,XSLT,XSD,Web Service other than 'Biztalk...
4
by: Ian Turner | last post by:
Hi, In an attempt to get every request for a particular virtual directory to go through ASP.NET I've been trying to add a wildcard application mapping. The scenario is that any url for that VD,...
4
by: BentleyInc | last post by:
I'm trying to find a way to add a whildcard application mapping to aspnet_isapi.dll in IIS programmatically.... been looking into IIS administrator reference but didn't find the right function to...
6
by: Michael Tissington | last post by:
I'm trying to add some extensions to IIS on the properties, home directory, config screen. I must be missing something because the OK button is always disabled ... Any ideas please ? --...
2
by: jasonlimwk | last post by:
hi... i am using vbnet to map to a machine and then copy some text based file to my pc... meaning.. map from windows XP to windows XP but now the problem is.. we here have some pc which is not...
1
by: none | last post by:
Hi, I'm trying to establish table mappings, and I've hit a snag. At the point to where I try to fill the schema (DB_adapter.FillSchema), I get an exception, and the message is as follows:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.