VWD DetailsView' does not allow indexed access.

  • Thread starter Thread starter barret bonden
  • Start date Start date
B

barret bonden

Trying to get a value from a Visual Web Developer data control - and place
it in a textbox (Hope I'm not in the wrong group here - ttrying to get into
the VWD forum for 2 days now - NG)

<script runat="server">

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs)

TextBox2.Text = DataBinder.Eval(DetailsView1, "[0].last")


End Sub

</script>


DataBinding: 'System.Web.UI.WebControls.DetailsView' does not allow indexed
access.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.ArgumentException: DataBinding:
'System.Web.UI.WebControls.DetailsView' does not allow indexed access.

Source Error:

Line 6:
Line 7: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
Line 8: TextBox2.Text = DataBinder.Eval(DetailsView1, "[0].last")
Line 9:
Line 10: End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top