[newbie] binding anomaly
-
I'm going through a tutorial which mentions the use of:
1. This does not seem to compile. Error message: Attribute values must be enclosed in quotation marks. 2. <%DataBinder.Eval (Container.DataItem, "SupID" %> This does not compile. Error message: The name 'Container does not exist in the current context' 3. When I use the following connection string, I get an error from SQL Server, only on DELETE statements: hookUp = new SqlConnection("Database=localhost\\$INSTANCENAME; Database=$DATABASE_NAME; Integrated Security = True". I resolved this by using the connection string generated by Visual Studio and the code compiled fine (lazy fashion), however, I could not understand how the same connection string returned no errors with SQL UPDATE and SELECT statements.
:confused: Reference book ASP.NET 3.5 - A Beginner's Guide written by William B. Sanders (2009).Jon
-
I'm going through a tutorial which mentions the use of:
1. This does not seem to compile. Error message: Attribute values must be enclosed in quotation marks. 2. <%DataBinder.Eval (Container.DataItem, "SupID" %> This does not compile. Error message: The name 'Container does not exist in the current context' 3. When I use the following connection string, I get an error from SQL Server, only on DELETE statements: hookUp = new SqlConnection("Database=localhost\\$INSTANCENAME; Database=$DATABASE_NAME; Integrated Security = True". I resolved this by using the connection string generated by Visual Studio and the code compiled fine (lazy fashion), however, I could not understand how the same connection string returned no errors with SQL UPDATE and SELECT statements.
:confused: Reference book ASP.NET 3.5 - A Beginner's Guide written by William B. Sanders (2009).Jon
jon_80 wrote:
Attribute values must be enclosed in quotation marks.
Correct. Text="<%# boundMessage() %>"
jon_80 wrote:
The name 'Container does not exist in the current context'
I assume this code exists outside of a bound control. Actually, I think you need to use <%# or <%= ( I forget which )
jon_80 wrote:
When I use the following connection string, I get an error from SQL Server, only on DELETE statements:
And what is the error ?
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
-
jon_80 wrote:
Attribute values must be enclosed in quotation marks.
Correct. Text="<%# boundMessage() %>"
jon_80 wrote:
The name 'Container does not exist in the current context'
I assume this code exists outside of a bound control. Actually, I think you need to use <%# or <%= ( I forget which )
jon_80 wrote:
When I use the following connection string, I get an error from SQL Server, only on DELETE statements:
And what is the error ?
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )