Last post Sep 14, 2012 04:35 PM by guzumba15
Apr 06, 2012 02:20 PM|Silverlight.Shailendra|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|cool.asp|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|Silverlight.Shailendra|LINK
I'm using DropDownList.
Page.MaintainScrollPositionOnPostBack = true;
Apr 06, 2012 02:38 PM|cool.asp|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|Silverlight.Shailendra|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|tdmca|LINK
put this in web.config
Apr 06, 2012 02:50 PM|Silverlight.Shailendra|LINK
I made changes in web.config... but still not working..
Apr 06, 2012 03:05 PM|cool.asp|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|Silverlight.Shailendra|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|tdmca|LINK
something is wrong
may be a bug
use ajax UpdatePanel and be happy
Apr 07, 2012 06:26 PM|Silverlight.Shailendra|LINK
OK... I uploaded it on my server and amezingly my problem get solved....
thanks to everybody
Sep 14, 2012 04:35 PM|guzumba15|LINK
I placed mine outside the If Not Me.Page.IsPostBack Then and it works flawlessly.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.Page.MaintainScrollPositionOnPostBack = True
If Not Me.Page.IsPostBack Then