Last post Sep 14, 2012 12:35 PM by guzumba15
Apr 06, 2012 10:20 AM|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 10:27 AM|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 10:31 AM|Silverlight.Shailendra|LINK
I'm using DropDownList.
Page.MaintainScrollPositionOnPostBack = true;
Apr 06, 2012 10:38 AM|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 10:42 AM|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 10:45 AM|tdmca|LINK
put this in web.config
Apr 06, 2012 10:50 AM|Silverlight.Shailendra|LINK
I made changes in web.config... but still not working..
Apr 06, 2012 11:05 AM|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 11:09 AM|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 12:09 PM|tdmca|LINK
something is wrong
may be a bug
use ajax UpdatePanel and be happy
Apr 07, 2012 02:26 PM|Silverlight.Shailendra|LINK
OK... I uploaded it on my server and amezingly my problem get solved....
thanks to everybody
Sep 14, 2012 12: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