Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ObjectDataSource in Code Bedind erstellen

Empfohlene Antworten

Veröffentlicht

Hallo,

ich versuche gerade mit Hilfe des ObjectDataSource-Object eine generische Liste zu erhalten welche ich über eine Methode in einer anderen Klasse als Rückgabewert erhalte. Wenn ich in meinem Designer dieses ODS-Object einfüge und dieses dann mit dem Wizard konfiguriere klappt alles wunderbar. Ich möchte jedoch dynamisch im Code Behind ein solches ObjectDataSource-Object erstellen. Ich war bisher soweit:


ObjectDataSource _src = new ObjectDataSource();

_src.SelectMethod = "GetList";

_src.TypeName = "BizLayer.PersonsData";


GridView1.DataSource = _src.Select();

GridView1.DataBind();

Das Problem ist jedoch, dass keine Daten angezeigt werden. Habt ihr eine Idee woran das liegen könnte?

Danke!

  • 1 Monat später...

du musst die DataSourceID setzen. Oder als DataSource eine Liste (IEnumerable/IEnumerable<T>) übergeben UND DataBind() aufrufen.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.