ASP.NET AJAX and the QueryString

G

Guest

Hi there:

I'm using ASP.NET AJAX and liking it, but I've run into an issue I'm not
sure how to address.

I'm building a very simple image browser I'm sure you've all seen before --
one asp:Image tag and a couple of Next/Previous LinkButtons -- and
everything's working just fine, but of course, since we're not doing
full-page refreshes, the URL in the Address bar never changes -- it simply
remains Photo.aspx, for instance. I'd like to be able to set either a
QueryString parameter that the user can copy and pass around to others,
allowing the recipient to click the link and jump right to the image the
sender intended her to see.

Any out-of-the-box way to address this? In pure JavaScript plus handcrafted
Ajax, I think I could do it, but I'm wondering whether there's a way to do it
properly in the ASP.NET AJAX world.

Thanks much in advance!

Chris
 
M

Masudur

Hi there:

I'm using ASP.NET AJAX and liking it, but I've run into an issue I'm not
sure how to address.

I'm building a very simple image browser I'm sure you've all seen before --
one asp:Image tag and a couple of Next/Previous LinkButtons -- and
everything's working just fine, but of course, since we're not doing
full-page refreshes, the URL in the Address bar never changes -- it simply
remains Photo.aspx, for instance. I'd like to be able to set either a
QueryString parameter that the user can copy and pass around to others,
allowing the recipient to click the link and jump right to the image the
sender intended her to see.

Any out-of-the-box way to address this? In pure JavaScript plus handcrafted
Ajax, I think I could do it, but I'm wondering whether there's a way to do it
properly in the ASP.NET AJAX world.

Thanks much in advance!

Chris

Hi...

I also suffered from this problem.... my problem was supporting back
button.... of the browser...

Check out this link...

http://www.nikhilk.net/UpdateControls.aspx

nikhil is providing us a very good way to encapsulate all the stuff
you said...

UpdateHistoryControl.... is non visible control... and provide the
back button support :)

and unique url as welll

Hope this help...

Thanks...
Masudur
http://www.kaz.com.bd
http://munnacs.blogspot.com
 
D

darrel

I'm building a very simple image browser I'm sure you've all seen
before --
one asp:Image tag and a couple of Next/Previous LinkButtons -- and
everything's working just fine, but of course, since we're not doing
full-page refreshes, the URL in the Address bar never changes -- it simply
remains Photo.aspx, for instance. I'd like to be able to set either a
QueryString parameter that the user can copy and pass around to others,
allowing the recipient to click the link and jump right to the image the
sender intended her to see.

This is the drawback to AJAX and flash and the like.

There's not a huge reason to put your slide show into AJAX. The easiest
solution may be to simply not use AJAX for this.

Otherwise, I'd suggest creating a permalink type of link. Have this link
update with each image via AJAX and give it the appropriate querystring.

-Darrel
 
G

Guest

Hi Darrel:

Thanks for the reoly. I only posted because I wanted to know how to handle
the situation *in* ASP.NET AJAX, or of there was a way. It wasn't a "should
I" kind of question on application design -- it was a how-to question.

But thanks for the input anyway.

Chris
 
G

Guest

Awesome, thanks Masudur!

Masudur said:
Hi...

I also suffered from this problem.... my problem was supporting back
button.... of the browser...

Check out this link...

http://www.nikhilk.net/UpdateControls.aspx

nikhil is providing us a very good way to encapsulate all the stuff
you said...

UpdateHistoryControl.... is non visible control... and provide the
back button support :)

and unique url as welll

Hope this help...

Thanks...
Masudur
http://www.kaz.com.bd
http://munnacs.blogspot.com
 
D

darrel

Thanks for the reoly. I only posted because I wanted to know how to
handle
the situation *in* ASP.NET AJAX, or of there was a way. It wasn't a
"should
I" kind of question on application design -- it was a how-to question.

Understood, but, again, it's like asking how do I build a house with a
spatula? There really isn't a proper way TO build a house with a spatula.
It's the wrong tool for the job.

AJAX is a tool to be used as a part of a web site. It's great for some
things...not so great for others.

Now, I haven't used the 'updateHistory' control mentioned, but I find it
hard to believe that it can change the URL of the page, as that's a major
security flaw in the browser if so (come to think of it, I'd argue that
messing with the back button is a problem, too, though I realize it's
doable). So, you're still left with not being able to bookmark a specific
image, which I think is your ultimate goal.

As such, the answer I gave you would probably accomodate your need (create a
permalink on the page itself).

-Darrel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top