Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. [newbie] binding anomaly

[newbie] binding anomaly

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasetutoriallearningasp-net
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jon 80
    wrote on last edited by
    #1

    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

    C 1 Reply Last reply
    0
    • J jon 80

      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

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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 )

      J 1 Reply Last reply
      0
      • C Christian Graus

        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 )

        J Offline
        J Offline
        jon 80
        wrote on last edited by
        #3

        Well, I tried

        to no avail, because VS generated the following error:

        Server tags cannot contain <% ... %> constructs.

        Jon

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups