Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Sep 14, 2012 04:35 PM by guzumba15
Member
431 Points
369 Posts
Apr 06, 2012 02:20 PM|LINK
Hi All,
I displayed Cities statewise by using code behind. But my MaintainScrollPositionOnPostback="true" is not working....
Can anybody tell me where i am doing wrong?
545 Points
190 Posts
Apr 06, 2012 02:27 PM|LINK
Show us some code, is MaintainScrollPositionOnPostback="true" in PageLoad?
Maybe you are reloading the whole page instead of just posting back...
What control is causing postback?
Apr 06, 2012 02:31 PM|LINK
I'm using DropDownList.
if(Page.IsPostBack)
{
Page.MaintainScrollPositionOnPostBack = true;
}
Apr 06, 2012 02:38 PM|LINK
Try putting it into the dropdownlist onselectedindexchanged event...
The problem might be that you are not setting the property true until after the first postback.
Does it work after the second time you select from the DDL?
Apr 06, 2012 02:42 PM|LINK
Yes!!! i called bindCities() onselectedindexchanged event of ddlState
also i set the true for MaintainScrollPositionOnPostBack here... as you said... but still not working...
and yes it is everytime displaying proper cities according to states....
Contributor
2396 Points
661 Posts
Apr 06, 2012 02:45 PM|LINK
put this in web.config
<system.web><pages maintainScrollPositionOnPostBack="true"> </pages> </system.web>
Apr 06, 2012 02:50 PM|LINK
I made changes in web.config... but still not working..
Apr 06, 2012 03:05 PM|LINK
Something isn't right. This is a lame suggestion but maybe you can set focus on the dropdownlist on selectedindexchanged? lol
Apr 06, 2012 03:09 PM|LINK
:-) it's was cool idea... oh!! god, I tried on the code... the focus stays on the DDLStates but didn't get the expected o/p.
Apr 06, 2012 04:09 PM|LINK
something is wrong
may be a bug
use ajax UpdatePanel and be happy
Silverlight....
Member
431 Points
369 Posts
regarding MaintainScrollPositionOnPostback
Apr 06, 2012 02:20 PM|LINK
Hi All,
I displayed Cities statewise by using code behind. But my MaintainScrollPositionOnPostback="true" is not working....
Can anybody tell me where i am doing wrong?
cool.asp
Member
545 Points
190 Posts
Re: regarding MaintainScrollPositionOnPostback
Apr 06, 2012 02:27 PM|LINK
Show us some code, is MaintainScrollPositionOnPostback="true" in PageLoad?
Maybe you are reloading the whole page instead of just posting back...
What control is causing postback?
Silverlight....
Member
431 Points
369 Posts
Re: regarding MaintainScrollPositionOnPostback
Apr 06, 2012 02:31 PM|LINK
I'm using DropDownList.
if(Page.IsPostBack)
{
Page.MaintainScrollPositionOnPostBack = true;
}
cool.asp
Member
545 Points
190 Posts
Re: regarding MaintainScrollPositionOnPostback
Apr 06, 2012 02:38 PM|LINK
Try putting it into the dropdownlist onselectedindexchanged event...
The problem might be that you are not setting the property true until after the first postback.
Does it work after the second time you select from the DDL?
Silverlight....
Member
431 Points
369 Posts
Re: regarding MaintainScrollPositionOnPostback
Apr 06, 2012 02:42 PM|LINK
Yes!!! i called bindCities() onselectedindexchanged event of ddlState
also i set the true for MaintainScrollPositionOnPostBack here... as you said... but still not working...
and yes it is everytime displaying proper cities according to states....
tdmca
Contributor
2396 Points
661 Posts
Re: regarding MaintainScrollPositionOnPostback
Apr 06, 2012 02:45 PM|LINK
put this in web.config
<system.web><pages maintainScrollPositionOnPostBack="true">
</pages>
</system.web>
Silverlight....
Member
431 Points
369 Posts
Re: regarding MaintainScrollPositionOnPostback
Apr 06, 2012 02:50 PM|LINK
I made changes in web.config... but still not working..
cool.asp
Member
545 Points
190 Posts
Re: regarding MaintainScrollPositionOnPostback
Apr 06, 2012 03:05 PM|LINK
Something isn't right. This is a lame suggestion but maybe you can set focus on the dropdownlist on selectedindexchanged? lol
Silverlight....
Member
431 Points
369 Posts
Re: regarding MaintainScrollPositionOnPostback
Apr 06, 2012 03:09 PM|LINK
:-) it's was cool idea... oh!! god, I tried on the code... the focus stays on the DDLStates but didn't get the expected o/p.
tdmca
Contributor
2396 Points
661 Posts
Re: regarding MaintainScrollPositionOnPostback
Apr 06, 2012 04:09 PM|LINK
something is wrong
may be a bug
use ajax UpdatePanel and be happy