tips54
asked on
BC30203: Identifier expected.
Hi.
I'm pretty new with .net and I need to export some data to a browser and i'm getting compiler error when I run the browser viewer. from the code at the bottom can any see what I've messed up. Thanks in advance.
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: BC30203: Identifier expected.
Line 19:
Line 20: <asp:Repeater id="Repeater1" runat="server">
Line 21: <ItemTemplate> <%# Container.DataItem.("rel_q ty")%>
Line 22:
Line 23: </ItemTemplate>
Source File: c:\inetpub\wwwroot\subSP\S peciaProje ctForm.asp x Line: 21
Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim temp = txtprojectnum.Text
End Sub
Sub btngetproject_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btngetproject.Click
'Put user code to initialize the page here
Dim ConCC As SqlConnection
Dim cmdSelect As SqlCommand
'Dim StrConCC As String
Dim Strselect As String
Dim projnumber As String
Dim sortOrder
Dim supplierdata As SqlDataReader
projnumber = txtprojectnum.Text
'sortOrder = SortOrderDrp.SelectedValue
'StrConCC = ConfigurationSettings.AppS ettings("c cConString ")
ConCC = New SqlConnection("server=(thu nder);data base=Avala nche_89038 2671;Trust ed_Connect ion=yes")
ConCC.Open()
'begin purchasing query
Strselect = "sp_speciprj"
cmdSelect = New SqlCommand(Strselect, ConCC)
cmdSelect.CommandType = CommandType.StoredProcedur e
cmdSelect.Parameters.Add(" @pid", projnumber)
'cmdSelect.Parameters.Add( "@Location _id", sortOrder)
cmdSelect.CommandTimeout = 0
supplierdata = cmdSelect.ExecuteReader()
Repeater1.DataSource = supplierdata
Repeater1.DataBind()
supplierdata.Close()
ConCC.Close()
End Sub
I'm pretty new with .net and I need to export some data to a browser and i'm getting compiler error when I run the browser viewer. from the code at the bottom can any see what I've messed up. Thanks in advance.
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: BC30203: Identifier expected.
Line 19:
Line 20: <asp:Repeater id="Repeater1" runat="server">
Line 21: <ItemTemplate> <%# Container.DataItem.("rel_q
Line 22:
Line 23: </ItemTemplate>
Source File: c:\inetpub\wwwroot\subSP\S
Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim temp = txtprojectnum.Text
End Sub
Sub btngetproject_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btngetproject.Click
'Put user code to initialize the page here
Dim ConCC As SqlConnection
Dim cmdSelect As SqlCommand
'Dim StrConCC As String
Dim Strselect As String
Dim projnumber As String
Dim sortOrder
Dim supplierdata As SqlDataReader
projnumber = txtprojectnum.Text
'sortOrder = SortOrderDrp.SelectedValue
'StrConCC = ConfigurationSettings.AppS
ConCC = New SqlConnection("server=(thu
ConCC.Open()
'begin purchasing query
Strselect = "sp_speciprj"
cmdSelect = New SqlCommand(Strselect, ConCC)
cmdSelect.CommandType = CommandType.StoredProcedur
cmdSelect.Parameters.Add("
'cmdSelect.Parameters.Add(
cmdSelect.CommandTimeout = 0
supplierdata = cmdSelect.ExecuteReader()
Repeater1.DataSource = supplierdata
Repeater1.DataBind()
supplierdata.Close()
ConCC.Close()
End Sub
There shouldn't be a period after DataItem in your binding expression: <%# Container.DataItem("rel_qt y")%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.