473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

repeater and postback - arye

team,

my postback is changing once i bind an arraylist to a
repeater.

how can i get the postback to return true?

'''''''''''''''''''''''''''''''''''''''''

'declarations
Dim reportValues As ArrayList = New ArrayList

private sub page_load
If IsPostBack Then
'do something else
else
getreports
end if

Private Sub GetReports()

' Put user code to initialize the page here
Dim rs As New reportService.ReportingService

rs.Credentials =
System.Net.CredentialCache.DefaultCredentials

Try

' Return a list of catalog items in the report server db
Dim items As reportService.CatalogItem() = rs.ListChildren
("/", True)
Dim co As reportService.Property

'For each report, display stuff in the repeater
Dim ci As reportService.CatalogItem

' do a for loop to get the name of multiple reports
For Each ci In items

If ci.Type = reportService.ItemTypeEnum.Report Then

' add the name value to our array
reportValues.Add(New reportNames(ci.Name, ci.Path))

' bind the array to our repeater
reportList.DataSource = reportValues
reportList.DataBind()

End If
Next ci

Catch oBug As Exception
MsgHeader.ShowAndPublish(oBug)
End Try

End Sub
Nov 20 '05 #1
1 2320
Wouldn't you want to only bind your datasource when NOT postback=true? Won't
your repeater's viewstate preserve their value on postback?

If Not IsPostBack Then
getreports
End If

Greg

"Andy" <an*******@discussions.microsoft.com> wrote in message
news:0f****************************@phx.gbl...
team,

my postback is changing once i bind an arraylist to a
repeater.

how can i get the postback to return true?

'''''''''''''''''''''''''''''''''''''''''

'declarations
Dim reportValues As ArrayList = New ArrayList

private sub page_load
If IsPostBack Then
'do something else
else
getreports
end if

Private Sub GetReports()

' Put user code to initialize the page here
Dim rs As New reportService.ReportingService

rs.Credentials =
System.Net.CredentialCache.DefaultCredentials

Try

' Return a list of catalog items in the report server db
Dim items As reportService.CatalogItem() = rs.ListChildren
("/", True)
Dim co As reportService.Property

'For each report, display stuff in the repeater
Dim ci As reportService.CatalogItem

' do a for loop to get the name of multiple reports
For Each ci In items

If ci.Type = reportService.ItemTypeEnum.Report Then

' add the name value to our array
reportValues.Add(New reportNames(ci.Name, ci.Path))

' bind the array to our repeater
reportList.DataSource = reportValues
reportList.DataBind()

End If
Next ci

Catch oBug As Exception
MsgHeader.ShowAndPublish(oBug)
End Try

End Sub

Nov 20 '05 #2

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

Similar topics

5
by: Scott Lyon | last post by:
I am having a strange problem. The program is a bit complex, but I'll try to simplify what I can. I apologize if this is complicated, but I think this would still be simpler than posting a bunch of...
8
by: Invalidlastname | last post by:
Hi, We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue...
6
by: Christoph Boget | last post by:
Could someone point me to a resource that discusses how to set up other controls (input box, checkbox, drop down list), etc to be used in a Repeater? I'm not having a problem displaying text in...
4
by: Harry | last post by:
Hello, I have a Repeater control that contains a Label control inside its ItemTemplate. A dummy mockup of the HTML code looks as follows: <asp:repeater id="StyleRepeater" Runat="server">...
0
by: Amir | last post by:
Hi every one This is the problem: I have a UserControl that contains a Repeater and a few LinkButton. The Repeater generate some linkButton. I use this control for implementing paging solution...
1
by: olduncleamos | last post by:
Hello all, I am experimenting with the repeater control and ran into something that I wasn't expecting. I would appreciate if the experts can confirm or correct my understanding. Here is a...
4
by: Dennis E. Jones, Jr. | last post by:
I'm creating a dynamic control for each row in a REPEATER based on database values. ItemDataBound creates the control for the initial load (not postback), but I cannot get the control recreated...
1
by: Timbo | last post by:
Hi all, This is my first message here so i'll try and include all the information that will help you help me out, if possible. Basically I am using C# in ASP.NET 2.0 and have a Repeater...
1
by: Jeremy | last post by:
Hello All, I have a Repeater which contains a Dynamic DropDownList within its itemtemplate. I know I have struggled with this before and I am pretty sure I had to save a bunch of crap manually...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.