C# – Magic with URL in asp.net – 3.5


This is my dilema:

My web site done in asp.net 3.5. I have buttons which if the user clicks should show images. The images are located at a third party and accessible via web url. So my app has to login to this third party app and they will return a url to me which i should then do a response.redirect in my website and show the user images

Think of it as have your own web page. you want to displlay images from yahoo and you need to log on to yahoo and all you have is a web address and know that it takes in username/password as either form elements or you could do yahoo.com?username=blah&pwd=doe

This would in normal sense take you to your yahoo home page and the login call also returns you a random file path which you use in your asp.net app and perform magic so that your web page is now redirected to yahoo.com/username/randomfilepath, which is basically a thumbnail page of your images.

i have tried doing this webrequest and then performing a response.redirect once i got the response back but that was a show stopper.

Best Solution

You might want to think about doing this inside of an IFrame. I did some facebook work which required the user to login to their facebook account. Then facebook returned to a my page at a url i specified.

What I did was create an IFrame then using the JQuery Dialog plugin showed the iframe, had that iframe postback to a FinishedLoggingIn.aspx page, then from that page I called window.top.someJavascriptToDisplayImages(someJsonWithImages);