| |

VerySource

 Forgot password?
 Register
Search
View: 695|Reply: 3

Regarding the problem of Repeater binding data, hurriedly !!!

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-4 11:30:01
| Show all posts |Read mode
Data source binding for Repeater1 in Page_Load:
    Private Sub Page_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim cls_hrs_vacationdef = New cls_hrs_vacationdef
        Repeater1.DataSource = cls_hrs_vacationdef.hrs_SelectAll ("2016-01-01", "2016-12-31", "", "")
        Repeater1.DataBind ()
    End Sub
When executing, it prompts an error:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30516: No accessible "Eval" accepted this number of parameters, so the overload decision failed.

Source Error:

 

Line 125: <ItemTemplate>
Line 126: <TR bgColor = "# ffffff" height = "20">
Line 127: <TD class = "style1"> <% # DataBinder.Eval ("name")%>
Line 128: </ TD>
Line 129: <TD class = "style1">
 
What is going on? Is Eval () executed before Page_Load? How to solve it, thank you.
Reply

Use magic Report

0

Threads

29

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-5-17 05:45:02
| Show all posts
<% # DataBinder.Eval (Container.DataItem, "name")%>
Reply

Use magic Report

0

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-5-17 11:45:01
| Show all posts
DataBinder.Eval () requires at least two parameters.


DataBinder.Eval (Container.DataItem, "name")
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-5-17 13:30:01
| Show all posts
Thanks, the problem is solved.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list