Link to home
Start Free TrialLog in
Avatar of QuinnDester
QuinnDesterFlag for United Kingdom of Great Britain and Northern Ireland

asked on

passing and retrieving target url

Here is my problem..

I need to update an xml feed url attribute on the fly, with a new url using the old url as the target,

like this
original url, http://www.somesite.com/?someparam=this&anotherparam=that
new url redirect.aspx/?target=http://www.somesite.com/?someparam=this&anotherparam=that
in the redirect page i need to retrieve the target URl append some more veriables and then redirtect.

i think i can do the replacing in the XSLT without a hitch I need to now the syntax for passing the target URL though.

I also want to confirm this is valid, as the resulting URL will end up with 2 ? in it, and how would i collect the full url in C# when i try and retrieve it, as the url has parameters of its own
Thank you
SOLUTION
Avatar of GuitarRich
GuitarRich
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of QuinnDester

ASKER

I cant do that, i dont have access to the URL in the code behind untill after it is passed.

the URL comes directly from an xml feed which is transformed through my xslt file and out put directly to the page in html, i can added the redirect.aspx?target= to the start of the url.

Unless there is a way of encoding the url in XSLT while it is being transformed?
A thought, if i used a form button for the link on the web page could i pass the url as the value and have the redirect as the action.

if so how would i go about building a form button in  XSLT ?
I have created the form button in XSLT and it dispalys fine when testing it, but when the transformed html is displayed within the contentplaceholeder of my web page i get inconsitant result.
everything is in the page 8 times out of 10 refreshes only the first product of 20 is showing, the rest are  not showing, like they have been changed to the same color as the background.

the other 2 times they show correctly.
I have found another way to do this, by URL encoding the URL within the xslt and passing it as a target tribute on the url.

I would still like to know if picking up a hidden field value from a plain html page is possible in .net
as this would come in very handy if it is, so will leave this question open for now.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial