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. problem with formview update

problem with formview update

Scheduled Pinned Locked Moved ASP.NET
helpxmlannouncement
4 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.
  • L Offline
    L Offline
    lovedotnet
    wrote on last edited by
    #1

    Hi, i am usign formview control in my user control. when i use formview.UpdateItem(true), i got this error "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control." I have googled about it, i couldnt sort out the problem. Can anyone help me, please. thanks, deep.

    C 1 Reply Last reply
    0
    • L lovedotnet

      Hi, i am usign formview control in my user control. when i use formview.UpdateItem(true), i got this error "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control." I have googled about it, i couldnt sort out the problem. Can anyone help me, please. thanks, deep.

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

      It means you wrote code outside of a databound control ( such as a grid view ) that can only run inside such a control. Such as <%# Eval("columnname") %>

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      L 1 Reply Last reply
      0
      • C Christian Graus

        It means you wrote code outside of a databound control ( such as a grid view ) that can only run inside such a control. Such as <%# Eval("columnname") %>

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        L Offline
        L Offline
        lovedotnet
        wrote on last edited by
        #3

        What do you mean by outside of control ? do u mean in another class?? this formview is in a usercontrol which i am using in another aspx page. How can i use it in another aspx page without getting error ? thanks, deep.

        C 1 Reply Last reply
        0
        • L lovedotnet

          What do you mean by outside of control ? do u mean in another class?? this formview is in a usercontrol which i am using in another aspx page. How can i use it in another aspx page without getting error ? thanks, deep.

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

          That is irrelevant. What is relevant is that you've used a data binding statement, in your ascx or aspx, and it's outside of a control that uses such statements.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          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