.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Stop InfoPath maintaining scroll position on View Switch

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :C#

I have a no-code multipage InfoPath browser form (2010), with repeated navigation buttons at the top and bottom of each page for ease-of-use.

When switching views using the bottom navigation bar, the scroll position is retained in the new view, so the user is presented with the bottom of the new page rather than the top...(!!)

I realise this is undesired postback behaviour, but can I disable/bypass this issue?


View Complete Post

More Related Resource Links

setting scroll position for a ListBox


I have a ListBox control showing 10 rows.  I have 30 rows total in the listbox.  How do I programmatically adjust the scroll to show the last ten rows?

Some sources have suggested that I set the SelectedItem.  But I am already making selections (myListBox.Items[28].Selected = true, myListBox.Items[29].Selected = true, etc); the listbox scroll is positioned on Item[0] not the first selected item.  I have also tried setting myListBox.SelectedItem in addition to the multiple selection just mentioned but that does not have any affect either.


Infopath 2007 print view in browser enabled form with Print button


Hi i create a  print view brower enabled form in Infopath 2007 with header and footer. In Infopath works fine. Margin was ok, header and footter to. But then i try to print this browser the margin, header and footer it changes to default setting of browser ? I try also create a print button in form with VS 2008 code, but method :

this.print(); not working.

It is possible to print the "print view" in browser as the same like in Infopath 2007? Does anyone have the code how to create a print button in C# on browser enabled form?

Issue in Infopath 2007 browser form - cascading dropdown using owssvr.dll filter view


Referring the below link, I created a cascading dropdown. The parent dropdown has sharepoint list as datasource and the child dropdown has xml datasource that points to owssvr.dll filter view. The cascading drop down works fine in preview but throws error after publishing as admin approved form - "form cannot run the specified query" exception when trying to execute xml datasource i.e., when a value is selected in parent dropdown. The security is 'Full Trust". In the event viewer the error message states "401 unauthorised" for the user a/c. the xml data source is an approved udcx file and in central admin, have enabled cross domain for infopath service. I have tried different solution provided in tech forums but issue still exists. Not sure whether Im missing something. Can someone guide me in fixing this issue?

Link Reffered:



Infopath 2007 not printing footer in browser print view

I have added a footer to the print view of a browser enabled form and it is not printing when printing the form. The footer is relatively sinmple, however when I click on print view on the browser form and use print preview, I cannot see the footer at all. I have set bottom margins to auto, however I am using an image in my header and therefore have a section at the top of each page where my page top margin is set to 0 and the margins lie within the bounds of the section at .25". The footer that is not displaying in print preview in the form is as follows;"Quote Number: &{/my:myFields/my:sqnumber&} &b&pof&P&b &b &{/my:myFields/my:group28/my:sqdate&}Revision: &{xdFormatting:FormatString("/my:myFields/my:sqquoterevision","number","numDigits:0;negativeOrder:1;")&} &b Prepared For: &{/my:myFields/my:sqclientname&}"The page setup in IE listed page number and url info when using print preview and I have set them to none because my footer is in the form. Please help, this is frustrating!

C# ASP.NET Problem keeping scroll position SelectionMode="Multiple"

Have tried numerous solutions and nothing has worked.  I'm pretty sure that Javascript is required to get this functional. Thanks for your help!    Here is the code for file Search.aspx ===BEGIN<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="search.aspx.cs" Inherits="SearchApp.search" MasterPageFile="~/Site1.Master" EnableViewState="true"%> <asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <fieldset> <legend style="text-align:center;"><b>Make Atleast one or multiple selections from one of the following categories</b></legend> <div class="wrapperserach"> <div> <div class="side-a"> County<asp:ListBox ID="Lcounty" runat="server" AutoPostBack="true" SelectionMode="Multiple" OnSelectedIndexChanged="Lcounty_SelectedIndexChanged" Width="140px"> <asp:ListItem value="1">Imperial</asp:ListItem>

SSRS Subscription Management: Restart, Stop, View Status, update properties, etc

As SSRS admins, there are times when a user comes to us and ask: I didn't get my reported emailed to me today?or worst, a report subscription going to multiple people doesn't run and now you have lots of people missing their subscription - (suppose server crashed, or something happened).One idea of course would be to have the subscription owner re-schedule it to run now, or create a new -- but - i'm thinking - we should create a subscription adminstration tool.a .net app that queries the ssrs web service, gets a list of subscriptions in the ssrs system (or perhaps by folder) and then is able to 'restart a subscription', "stop a running one", 'view all subscription status, schedule, owner, etc' if I wanted to d this - what is the web service that I could use this for?and most importanly - has anybody dont anything like this that they can share?this is for ssrs 2005 & and I'm hoping 2008 can be called through the same .net app tool

Filter Infopath Form View issue

Hi every body I want to Filter Infopath Form view based on the Document Library Name , or url . for example i have two document library : users and Moderators . I need if user open the form in users document library , the form opens with Users View and if user opens the form in Moderators document lib the form open with the Moderator view . what should i do ? I tried to insert a text box in my form and set it's default value to use sharepointlisturl function. but i think the sharepointlisturl function only use when the form hosted from the lists , not document libraries. when my form hosted from document library the text box is empty. i don't know what to do !

Visual Web Developer 2008 Express freezes when I switch to design view.

When I try to switch to design view of any form, aspx, or html, the entire program freezes and I heave to end task. It also freezes if I click Tools, Options, HTML Designer, CSS Styling. Any help would be appreciated.

How to stop Sharepoint Top Link Bar Scrolling when you scroll down vertically

I have a lot of TAB on my main sharepoint page, and when I scroll down vertically, this Top Link Bar go up and disappear from the screen, what I would like to do is this top link bar still remain the same all the time and only some others contents scroll up and down using vertical scroll bar. Could any one help me , how to do this. Thanks David

stay with the selected position in Grid View

I've got one columns of check boxes in a GridView, when i select the checkbox entire record(75 columns) is poupulated into formfileds resided just below the gidview. The problem I'm having is that when i selelect 50th record of database(db have 100 recrds) the view state should be  on 50th record level but it is scroll over to the toplevel after selecting the checkbox, if user wants to select the 51st record again he scroll to that level.how can i over come this problem.

InfoPath Print View in web based InfoPath forms not printing


Hi All,

I am using InfoPath 2007 web based forms along with SharePoint 2007. I have set print views in all forms with proper formatting. But when I try to print a form, print view is not printed instead current view of infopath is printed. This behavior is happening in InfoPath Web based forms however in InfoPath client based forms I am successfully able to print a form with print view.

Can any body help me how to solve this problem ? 

List box source updated, scroll into view



I have a list box with only item (a Image), its an observable collection , and that gets updated very often,

But if the previous source  was scrolled to the bottom,

 the new source is  also scrolled to the bottom,I want the new source to  scroll to the top evey time its changed

Ive tried scrollToview(currentItem) etc but  it doesnt seem to work

  ItemListForSlides bariatric_slides = new ItemListForSlides(bariatric, 1); // an observable collection

            if (ListBoxS != null)
                itemisdelcted = true;
                ListBoxS .ItemsSource = null;
                ListBoxS .ItemsSource = bariatric_slides;
                ListBoxS .Visibility = Visibility.Hidden;

Wizard Scroll Position


I have a page that contains a asp:Wizard control.

I set MaintainScrollPositionOnPostback = true for the page.

When the wizard proceeds to the next step, the scroll position from the previous step is maintained.

How can I make the scroll position to be at the top for a new step? and maintain it when it postback to to same step (like when there are validation errors).


ValidationSummary and Scroll Position



I have a form which has a number of user controls on it.  Each user control has a Validation Summary inside it, and if a user clicks on the the submit button for a particular User Control, the user control validates itself and shows errors in the Validation Summary.

The problem is that if any error show up, the page returns to the top of the page.  Is there any way of making sure that this doesn't happen?

Please don't advise me to use Page.MaintainScrollBackPosition because I already use this and this only helps when a post back occurs.  Because the validators execute on the client side, there is no post back.  I'm guessing there is a problem (?) with using ValidationSummary that causes the page to scroll up to the top of the page?

Get Control screen position from a MVVM View Model (not using CodeBehind in the control)


Hi, I am using a MVVM pattern for a WPF UserControl. I need to be able to position a dialog over the top of the control, so I need the top left screen coords for the control.

IF, I was to use code behind, the following seems to do the job..

 private void UserControl_MouseDoubleClick(object sender, MouseButtonEventArgs e)
   Point controlPos = PointToScreen(new Point(0, 0));

The controlPos above seems to give the correct result. However, is there anyway of doing this without having to use any code behind in the actual control (eg have the code purley perhaps in the View model class, of have something in the Controls XAML?

Thanks in advance for any help



Infopath view based on roles


hi, me again

i have created a form with 3 views.

what i'm trying to do is seperate the form in 3, for the user, approver and submitter to database.

first the user open the form to fill it in. then the approver opens the form to approve it, and at last the "submitter to database" open the form to send the records to the database.

for each view i created a role. when the user open the form it opens the form with the view for the user, and when the approver open the form it opens the form with the view for the approver.

but when the "submitter to the database" open the form it opens with the view of the approver.

how can i fix this so when the form is open by the "submitter to database" it opens with the view for the "submitter to database"?

infopath form default view issue



i'm having some issue with my form views.

i have 3 views for my form. 1 for the fill in, 1 for approving and the last one to be submitted to the database

i have set the fill in form as initiator. and the approver view as default but when the 3rd user wants to open the form to submit the form to the database it does not open the form with the view for submitter. it keeps opening the approver view.

and if i set the approver view to default it opens the approver view, if i set the fill in view to default it open the fill in view.

how can i fix this. can i only create 2 views for 1 form?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend