Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Sep 14, 2012 04:35 PM by guzumba15
Apr 06, 2012 02:20 PM|LINK
I displayed Cities statewise by using code behind. But my MaintainScrollPositionOnPostback="true" is not working....
Can anybody tell me where i am doing wrong?
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.
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....
Apr 06, 2012 02:45 PM|LINK
put this in web.config
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