473,769 Members | 5,885 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataPager Strange Behavior

Hello,

I am using the new ASP.NET 3.5 ListView and DataPager.

Everything is working fine but I am getting a strange behavior in the
DataPager.

When I click a pager button for the first time nothing happens.

When I click the second time it starts to work.

For this moment on every time I click a pager button the action taken
is the correspondent to my previous click.

What is going on?

My ListView uses a Linq as DataSource:

Private Sub lvTags_Init(ByV al sender As Object, ByVal e As
EventArgs) Handles lvTags.Init
With lvTags
.DataKeyNames = New String() {"TagId"}
.DataSource = ldsTags
.ID = "lvTags"
.ItemTemplate = New
ListTemplate(Li stTemplate.Temp lateType.ItemTe mplate)
.LayoutTemplate = New
ListTemplate(Li stTemplate.Temp lateType.Layout Template)
End With
End Sub

Private Sub lvTags_Load(ByV al sender As Object, ByVal e As
EventArgs) Handles lvTags.Load
lvTags.DataBind ()
End Sub

Private Sub ldsTags_Init(By Val sender As Object, ByVal e As
EventArgs) Handles ldsTags.Init
ldsTags.ID = "ldsTags"
End Sub

Private Sub ldsTags_Selecti ng(ByVal sender As Object, ByVal e As
LinqDataSourceS electEventArgs) Handles ldsTags.Selecti ng
Dim cms As New CMSDataContext
Dim tags = From t In cms.Tags _
Select t.TagID, _
t.Text
e.Result = tags
End Sub
The DataPager is created in the LayoutTemplate of my ListView
implemented by the class ListTemplate that I created:

Private Sub dpTags_Init(ByV al sender As Object, ByVal e As
EventArgs)

Dim dpTags As DataPager = CType(sender, DataPager)
Dim npfPages As New NumericPagerFie ld
With npfPages
.ButtonCount = 5
.ButtonType = ButtonType.Link
............... ............... ..........
End With

With dpTags
.ID = "dpTags"
.PageSize = 8
.Add(npfPages)
End With

End Sub

What am I doing wrong?

Thanks,

Miguel
Nov 22 '07 #1
0 1065

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1507
by: Alexander Inochkin | last post by:
Hi! I found same strange behavior of ASP.NET. It is possible this is the bug. Follow the steps:
0
3574
by: ivb | last post by:
Hi all, I am using DB2 8.1.11.1 on NT with ASP.NET 1.1 When application make connection to database (via ADO.NET), it set "Connection timeout" parameter to 30 seconds. After, when my webpage requests database, and query execution time exceeds 30 seconds, the following error reported: ===
6
2273
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to the same method (aka delegate?). I use the Tag property within this method to determine what user action is taking place. Very simple: When adding toolbar button: tbButton.Click += new...
0
1833
by: shapper | last post by:
Hello, I have been using the new ASP.NET 3.5 DataPager control. It is great. However I found a bug. Check how the PreviousPage / FirstPage and NextPage / LastPage are rendered, and disabled, when it is the first page or last page: <a disabled="disabled" class="PageNavigation">&lt;&l ... <span disabled="disabled"><input id=" ...
5
9537
by: Mark Olbert | last post by:
How do I get the DataPager and ListView to play nice together when I use a custom datasource? In my webpage, I use linq to pull data from a SqlServer database and assign the resulting IEnumerable<to the ListView's Datasource property. This all works fine to display the first 3 items (the DataPager is set to display three items at a time), but when I click on the next page in the DataPager...nothing happens. There's a roundtrip to the...
1
1889
by: =?Utf-8?B?TmVkaW0=?= | last post by:
Is it possible to use DataPager with custom loading classes (I use my own queries because of filtering and paging) and ListView control? ListView control is bound to a DataReader and DataReader method accepts page number and page size? Is there a way to make DataPager use my values and methods?
1
4975
by: shapper | last post by:
Hello, I am using a DataPager with a ListView. I am creating everything at runtime. I need to create a custom DataPager so that the numbers and the next previous symbols will be inside a list (ul li). How can I do this?
1
4920
by: bharathreddy | last post by:
Hi, I am using listview control for display. And I am using LINQ for binding the datasource to the listview control at the codebehind. I have implemented the paging in the listview control using the DataPager. But its not working properly. Whn I am clicking twice then i am able to navigate to the next page. I tried to bind the data in the prerender event but that too doesnt working. Why can this be happening. Can any one...
2
6465
by: sundaramails | last post by:
I am using DataPager in ListView. I put ListView In Infragistics Asynchronous Refresh Panel & Datapager in Update Panel. I have a button in Listview control(Run by client Script). When i click the button data pager shows twice in listview. Also data pager number when i click second time thatz run? Please Help...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7409
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5299
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3959
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.