ASP:Repeater problem?

Results 1 to 2 of 2

Thread: ASP:Repeater problem?

  1. #1
    Join Date
    Dec 1969

    Default ASP:Repeater problem?

    Hi<BR><BR>I&#039;m wondering if anybody can help, I&#039;m having trouble using the ASP:Repeater on a User Control, getting its values from a database which has its connection logic on a VB.NET Code Behind file.<BR><BR>The problem is that the ASP:Repeater will just not recognize the values for the declared variable in the Code Behind file ... where I have something like:<BR><BR>Dim myRepeater As Repeater<BR><BR>and then the various Datbinding etc to the datbase in the rest of the logic.<BR><BR>In the User Control, I have a call to the Code Behind file, and where I have the ASP:Repeater tag, I get an error where it does not recognise the tag ID for the Repeater, where I have:<BR><BR>ID="myRepeater"<BR><BR>Sorry, Im pretty vague with this, but I dont have the code at hand right now, so am doing it off the top of my head. So what Im wondering is how do you get an ASP:Repeater to get its values from a database, where all the connection and databindings logic is on a code behind file?<BR><BR>Any help at all would be great !!!!!<BR><BR>Gillies

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP:Repeater problem?

    this is how i done it using a codebehind file (c#)<BR><BR>the repeater has an id = MyReapter1<BR><BR>SqlDataAdapter myCommand = new SqlDataAdapter(strSql, sqlConnection1);<BR> DataSet ds = new DataSet();<BR> myCommand.Fill(ds,"TABLE");<BR> MyRepeater1.DataSource = ds.Tables["TABLE"].DefaultView;<BR> MyRepeater1.DataBind();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts