Resolving error of “is an unexpected token. The expected token is xx or xx . Line xx ,Position xx for Sharepoint 2007

This is a very generic error  fired by .net xml parsers System.Xml.XmlException. In our scenario this error has occured when we tried to change authentication providers for a site.

Usually this error is cuased by a missing charecter or illegal charecter usage in xml files. You know we have so many configuration file in sharepoint. Basic and first look place is that the Web.Config file. Notice that the line and position values and check your web.config file any problem on this location.

For our scenario the Problem Found on 23, 109 the double quots are not supported type for includesubfolders attribute

<PageParserPath VirtualPath=”/*” CompilationMode=”Always” AllowServerSideScript=”true” IncludeSubFolders=true />

So the error has fired once sharepoint try modification to web.config for update the authentication providers. So the error source is important to define which configuration file that you have to check.

 

 

Advertisements

Asp.net c# save scroll position when postback

this is the mana:
Page.MaintainScrollPositionOnPostBack Property

Msdn say  “gets or sets a value indicating whether to return the user to the same position in the client browser after postback. This property replaces the obsolete SmartNavigation property.When Web pages are posted back to the server, the user is returned to the top of the page. On long Web pages, this means that the user has to scroll the page back to the last position on the page.When the MaintainScrollPositionOnPostback() property is set to true, the user is instead returned to the last position on the page.”

Usage:
<asp:Page MaintainScrollPositionOnPostBack=”True|False” />

Or  you can add your web config like this for all pages
<system.web>
<pages validateRequest=”true”  maintainScrollPositionOnPostBack=”true”>
</system.web>

Important Note: There is also a problem with this . Does not work with other browsers except ie.

Source:
Happy codding !!