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

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

Page Up/Page Down scrolling behaviour with listview inside scrollviews

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :WPF

I have a listview with many list items that is contained within a scrollviewer.

When I select the topmost item and hit the Page Down key, the scrollviewer scrolls along with the listview. The same thing happens for combo boxes.

Is this the expected behaviour because I expected only the listview to scroll?

Here is some sample code:

<Window x:Class="WpfApplication1.Window1"

View Complete Post

More Related Resource Links

Finding a control inside a ListView on a master page

I have a listview on a master page that ISN'T part of a content place holder that I want to fill in and disable if the user is already logged in. I have a label set up already which works fine. I'm just having problems accessing a Textbox by the name of "NameTextBox" in the InsertItem template of the listview.Here is the part of my codefile:Dim vCurrentUser As MembershipUser = Membership.GetUser() If Not vCurrentUser Is Nothing Then Dim pnl As Label = LoginView1.FindControl("Label1") pnl.Text = Page.User.Identity.Name Dim NameBox As TextBox = ListView1.InsertItem.FindControl("NameTextBox") NameBox.Text = Page.User.Identity.Name End IfI get a Object not found exception. What is the correct way to find a control inside a InsertItemTemplate and the correct Event to use?

Printer Friendly Page from a listview control


Hi guys,

I am working on a web form that displays the data from an access data source into a list view control. I need an advice on how to create , render a new page printer freindly .not buttons, controls,,, I have implemented a  java script function to select which records I want to view in the printable page but I cannot came up with any idea on how  to use this to create the printable help..


Code inside page load is not executing.

  I am beginner to .Net development, so i am looking for a favour. Thanks a lot in advance!!!!!!! Question 1 :  protected void Page_Load(object sender, EventArgs e)    {        txtUserName.Text = "Focus";                txtUserName.Focus();            } I am unable to get focus to my textbox   Question 2 : I made javascript code for client side validation. function loginjs()        {            if(document.getElementById('txtUserName').value.length==0)            alert("UserName cannot be blank");            else if(document.getElementById('txtPassword').value.length==0)            alert("Password cannot be blank");                    } this code executes but it is not stopping further code execution. I mean it is only alerts but in addition to that i need to stop further execution.     &nbs

Float the Page Title Zone when scrolling down the page?

I would like the horizontal nav and everything above it to float (stay in view) as a user scrolls down the page, like the Ribbon (SharePoint:SPRibbon) does. Basically, this tag <div id="s4-workspace">     /bac

Render XML text *inside* of an ASP.net page?


I have a block of XML text I need to show the user (so they can copy/paste the XML from the screen)

I use StringWriter() to make the XML a String but when I use Response.Write(xmlString) I get the following error

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '<?xml version="1.0" '.

I guess IE does not like rendering XML in the middle of a page?

is there anyway to show the XML data in the middle of my ASPX page?

Many thanks! :)

how to print current page and all pages of listview?



I have a listview.When I click a "Print" button It should be  print only listview items (current page & all pages).

how to do this pls tell me?

many thanks in advance.

I cant print listview items to second page




I have a listview...

Here is the code...

Dim alta As Integer = 0
Dim yana As Integer = 0
txt.Text = 0
txtsayfa.Text = 0

Static pagenum As Integer = 0

For i = 0 To LV.items.count-1


            Dim aralik As New RectangleF(yana + 20, ust + alta, W / 4 - 15, H)
            e.Graphics.DrawString((LV.Items(i).SubItems(2).Text), font, Brushes.Black, aralik, trim)

            pagenum = pagenum + 1
            txt.Text = txt.Text + 1
            yana = yana + W / 4
            alta = alta + 200

            txtsayfa.Text = txtsayfa.Text + 1

            If txt.Text = 1 Then
                yana = 0

How to open a web page inside a container . The web page belongs to other website.



i want to open a website(lets say google) in my page.

Problem is i want to open Google inside my page which is a combination of a masterpage and a child page. What I want is when i click a link on the  page Google should be opened inside the page in my child page (which is inside the container of the Masterpage), not as a new page.


page inside update panel doesn't refresh the session object after postback of any control



I have many controls like dropdown, radiobuttonlist, etc on my page and I put all these controls inside the update panel so that the page doesn't look to be posting back when something is selected. Now the working on the page is very smooth. But the session object isn't getting refreshed even if I postback to the server and as a result even if the users are working on the page they are being sent to the login screen after 20 mins.

Is there anyway where I could put all the controls in update panel and still refresh the session after any postback(dropdown selection)

Any help is greatly appreciated.

Thanks in advance

form inside authenticated page!




Inside authenticated page for only authenticated users can reach, i want to create a form and link it to a database, and the data will be saved in the database for this user only.


what is the code to accomplish thing?

also when i make a history page, i need the data to be showing for this user only that entered his info into the form.


should i use details view? or create text-boxes and link it to database for inserting?

How to change the page(aspx) title from Usercontrol(ascx) the inside the page(aspx) (asp.net 1.1) ??




I have user control(ascx) inside  the page(aspx) and from the code behind of that user control How can I change the page(aspx) title??


Note : Please my Question about asp.net 1.1


And thanks with my best regarding


Finding control from master page inside tabcontainer in content page


I have a codebehind.vb for a master page from which I'm trying to find a hiddenfield in the content page. I was finding it like this without a hitch...

Dim hfContentSearch As HiddenField = CType(Page.Master.FindControl("main").FindControl("hfSearch"), HiddenField)

Then I decided to add an Ajax TabContainer to the content page. Now I'm having a hard time finding the hiddenfield. I've tried these variations, but still not working.

Dim hfContentSearch As HiddenField = CType(Page.Master.FindControl("main").FindControl("TabContainer1").FindControl("TabPanel1").FindControl("hfSearch"), HiddenField)

Dim hfContentSearch As HiddenField = CType(Page.Master.FindControl("main").FindControl("TabContainer1").FindControl("hfSearch"), HiddenField)

Dim hfContentSearch As HiddenField = CType(Page.Master.FindControl("main").FindControl("TabPanel1").FindControl("hfSearch"), HiddenField)

Can someone please help me with the syntax?

Thank you.


How to throw a 404 page erorr, or 302 from inside a controller



From inside my controller, I want to throw either a 404 page not found error or a 302 redirect.

How can I do this from within my controller?

(say for example if the page was not found etc)

How to use Navigation Hierarchy control with ListView Webpart on a custom web page?



Here is what i am trying to do with managed metadata and lists.

List name: MyList, it will have 2 managed metadata columns 'Business process' and 'Management model'. I have enabled metadata navigation settings for this list on mentioned columns

I will have a data view webpart mapped with MyList on one of the custom pages. I want to add Navigation Hierachy Control Or equivalent on this custom page which will be based on managed metadata columns 'Business process' and 'Management model'. On the selection of a node from this hierarchy, i would like to filter the ListView on the page.

Is there a way to directly use Navigation Hierarchy that we get on AllItems.aspx page corresponding to List? or any other out of the box method to achieve this WITHOUT custom code?

Thanks and regards,


UserControl inside SharePoint Content Page - Unexpected Error


Hello Everyone,

 I have created a Page using Sharepoint Designer (without association it to any MasterPage. Then I registered a user control Inside this which is working perfectly fine:

<%@ Page Language="C#" %>
<%@ Register src="~/_controltemplates/mDart2.0/FetchDataFromAit.ascx" TagName="ActionItems" TagPrefix="wssuc" %>
<html dir="ltr" xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">

<head runat="server">
<META name

Load the page contents while scrolling


Hi all,


I am using Jquery to load my page contents as i scroll down the page.

I refered the following link for this 


Now my problem with this is if i am having only the content which are to be loaded as it scrolls it works fine.

But if iam having any other controls or if i have master page the whole page is getting reloaded twice as it scrolls instead of

loading the content to be loaded as it scrolls.

The jquery can be referred in the link and the script are

$(document).ready(function() {
            $('#load').bind('submit', function(e) {


           function lastPostFunc() {

Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor
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