Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Maintaining client position on postback

Reply
Thread Tools

Maintaining client position on postback

 
 
Doug Daniels
Guest
Posts: n/a
 
      11-25-2003
Hi I was wondering if there was a simple way of
maintaining the position of the client after they post
back by selecting something in a aspropDownList with
auto-postback on.

I'm using it on a comics site to have the user select a
comic and have an image control change its URL depending
on the selection, but I don't want the page to reset to
the top every time the user chooses a comic. Here is my
event handler code:

--------------------

private void SelectComic_SelectedIndexChanged(object
sender, System.EventArgs e)
{
//make sure its a valid selection
if(this.SelectComic.SelectedIndex != -1)
{
this.ComicImage.ImageUrl =
this.SelectComic.SelectedValue;
}
}
 
Reply With Quote
 
 
 
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      11-25-2003
hi Doug,

Enable smartnavigation.on the page. Your user wont even see the page glitch
during a postback.

"Doug Daniels" <(E-Mail Removed)_CAPS> wrote in message
news:00c001c3b30c$e4b8c680$(E-Mail Removed)...
> Hi I was wondering if there was a simple way of
> maintaining the position of the client after they post
> back by selecting something in a aspropDownList with
> auto-postback on.
>
> I'm using it on a comics site to have the user select a
> comic and have an image control change its URL depending
> on the selection, but I don't want the page to reset to
> the top every time the user chooses a comic. Here is my
> event handler code:
>
> --------------------
>
> private void SelectComic_SelectedIndexChanged(object
> sender, System.EventArgs e)
> {
> //make sure its a valid selection
> if(this.SelectComic.SelectedIndex != -1)
> {
> this.ComicImage.ImageUrl =
> this.SelectComic.SelectedValue;
> }
> }



 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      11-26-2003
http://authors.aspalliance.com/jimro...ScrollPos.aspx

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"Doug Daniels" <(E-Mail Removed)_CAPS> wrote in message
news:00c001c3b30c$e4b8c680$(E-Mail Removed)...
> Hi I was wondering if there was a simple way of
> maintaining the position of the client after they post
> back by selecting something in a aspropDownList with
> auto-postback on.
>
> I'm using it on a comics site to have the user select a
> comic and have an image control change its URL depending
> on the selection, but I don't want the page to reset to
> the top every time the user chooses a comic. Here is my
> event handler code:
>
> --------------------
>
> private void SelectComic_SelectedIndexChanged(object
> sender, System.EventArgs e)
> {
> //make sure its a valid selection
> if(this.SelectComic.SelectedIndex != -1)
> {
> this.ComicImage.ImageUrl =
> this.SelectComic.SelectedValue;
> }
> }



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maintaining GridView Position After Postback Jason ASP .Net 9 12-17-2009 07:56 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui C++ 0 04-27-2009 12:51 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui C Programming 0 04-27-2009 12:51 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui Python 0 04-27-2009 12:46 PM
Panel not maintaining scroll position Sobin ASP .Net 0 01-03-2008 06:44 AM



Advertisments