By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,344 Members | 1,114 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,344 IT Pros & Developers. It's quick & easy.

repeater and postback - arye

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.