Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8562431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:43:43+00:00 2026-06-11T16:43:43+00:00

Hope someone can help me out of this issue. Im trying to get data

  • 0

Hope someone can help me out of this issue.
Im trying to get data from a mdf database into a repeater.

I have created the dbml file, its called “Thedatabaseconnection.dbml”, i have the web.config file and in that i have a connectionstring called “masterDBConnectionString”.

I have this vb class file.

Imports Microsoft.VisualBasic
Imports System.Web

Public Class connectionDBtesttable

Private _testId As Integer
Private _testCat As String
Private _testInfo As String
Private _testNumbers As Integer
Private _testDate As Date

Public Property test_id() As Integer
    Get
        Return _testId
    End Get

    Set(value As Integer)
        _testId = value
    End Set
End Property

Public Property test_cat() As String
    Get
        Return _testCat
    End Get

    Set(value As String)
        _testCat = value
    End Set
End Property

Public Property test_info() As String
    Get
        Return _testInfo
    End Get

    Set(value As String)
        _testInfo = value
    End Set
End Property

Public Property test_numbers() As Integer
    Get
        Return _testNumbers
    End Get

    Set(value As Integer)
        _testNumbers = value
    End Set
End Property

Public Property test_datetime() As Date
    Get
        Return _testDate
    End Get

    Set(value As Date)
        _testDate = value
    End Set
End Property

End Class

I have this code_behind

Imports System
Imports System.Linq

Partial Class _default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not IsPostBack Then
        Call linqdb()
    End If
End Sub

Private Sub linqdb()
    Using datacontext As New ThedatabaseconnectionDataContext()
        Dim query = From a In datacontext.GetTable(Of testtable)() _
                    Order By a.test_id Descending _
                    Select a

        Repeater1.DataSource = query.ToList
        Repeater1.DataBind()
    End Using
End Sub

End Class

I have this main page

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="default.aspx.vb" Inherits="_default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
    <asp:Repeater ID="Repeater1" runat="server">
    </asp:Repeater>
</div>
</form>
</body>
</html>

But i cant get the data from the DB into the repeater1…
Can someone plz help me, this is my first LinQ connection.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:43:44+00:00Added an answer on June 11, 2026 at 4:43 pm

    You have not specified what markup should be rendered for each item in the repeater. As an example try altering your markup as follows:

    <asp:Repeater ID="Repeater1" runat="server">
        <ItemTemplate>
            Info: <%# Eval("test_info") %>
            Date: <%# Eval("test_datetime") %>
        </ItemTemplate>
    </asp:Repeater>
    

    This will simply render info and date for each item returned from the DB. You can specify more complicated markup if you want to. For more info on this topic you can check out the MSDN page about the Repeater control.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to figure this out for days. Hope someone can help.
Hope someone can help me out with this problem I am having. I just
Hope someone can help i cant seem to get my head around this, i
I hope someone can help me out with this. I can't reproduce this error
I hope someone can help me out with this. I'd like to measure sorting
Hello all I hope someone can help me resolve this issue.. I'm curious as
Hi hope someone can help out with this one: What I basically want is
I really hope someone here can help out with this. I'm using Magento 1.6.1.0
I've been struggling with this issue for days, so I hope someone can help
I'm almost losing it, i really hope someone can help me out! I'm using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.