Hi.
I have so many controls in my pages.i want to maintain focus on current control.
I tried the property "maintain scroll position on postback" of the page .
But its not working.
Please reply...
Thanks in advance
Deepthi
Loading
Rakesh JhaPosted Oct 5, 2010, 2:19 AM
you don't have to upload your whole project only provide 2 or 3 pages and rest required files & folders
Suthish NairPosted Oct 5, 2010, 2:16 AM
Are you using Ajax on your web page.?
Did you tried the link i posted?
How can it possible none of the solution given here not working?
Are you getting any javascript error, below left corner of your IE?
Deepthi AravindPosted Oct 5, 2010, 2:02 AM
thats y i m added those lines to web.config.
Rakesh JhaPosted Oct 5, 2010, 1:53 AM
Manikavelu VelayuthamPosted Oct 5, 2010, 1:23 AM
Deepthi AravindPosted Oct 5, 2010, 1:11 AM
I have added the two properties ,MaintainScrollPositionOnPostback="true" and Smartnavigation="true" in web.config.
And also created browser file .But its not working.
Whether i have to mention those properties in all pages?
Suthish NairPosted Oct 4, 2010, 8:32 AM
I still remember, the first time when you load the page everything works fine. But after couple of postbacks its starts throwing js error or web form not loading.
from msdn:
http://msdn.microsoft.com/en-us/library/system.web.ui.page.smartnavigation.aspx
In most circumstances, do not set this property in code. Set the SmartNavigation attribute to true in the @ Page directive in the .aspx file. When the page is requested, the dynamically generated class sets this property.
Suthish NairPosted Oct 4, 2010, 8:11 AM
http://www.c-sharpcorner.com/UploadFile/Blogs/3440/
Rakesh JhaPosted Oct 4, 2010, 8:11 AM
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" MaintainScrollPositionOnPostback="true"%>
now after that put below code in code behind file
protected void Page_Load(object sender, EventArgs e)
{
SmartNavigation = true;
}
now create a default folder of App_Browsers in root directory and add new item, select browser.browser file and set its name like SafariFix.browser and put replace below code
<browsers>
<browser id="NewBrowser" parentID="Mozilla">
<identification>
<userAgent match="Unique User Agent Regular Expression" />
identification>
<capture>
<userAgent match="NewBrowser (?'version'\d+\.\d+)" />
capture>
<capabilities>
<capability name="browser" value="My New Browser" />
<capability name="version" value="${version}" />
capabilities>
browser>
<browser refID="Safari1Plus">
<capabilities>
<capability name="supportsMaintainScrollPositionOnPostback" value="true" />
capabilities>
browser>
browsers>
it will completely solve your problem, because i already tested in all three browsers
Manikavelu VelayuthamPosted Oct 4, 2010, 8:10 AM