ReverseDataBind

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Morris [Droopy eyes software]

    ReverseDataBind

    DataBind() will move data from my source object into the GUI, but is there a
    way to automatically reverse this data flow, or do I need to write code like
    this?

    MyPerson.Name = NameTextBox.Tex t;


    Thanks

    Pete


  • clickon

    #2
    RE: ReverseDataBind

    The new DataSource controls, with the new data bound controls in ASP.net 2.0
    come as close to this as you can get.

    "Peter Morris [Droopy eyes software]" wrote:
    [color=blue]
    > DataBind() will move data from my source object into the GUI, but is there a
    > way to automatically reverse this data flow, or do I need to write code like
    > this?
    >
    > MyPerson.Name = NameTextBox.Tex t;
    >
    >
    > Thanks
    >
    > Pete
    >
    >
    >[/color]

    Comment

    • Peter Morris [Droopy eyes software]

      #3
      Re: ReverseDataBind

      How is it done in dotnet 2?


      Comment

      • clickon

        #4
        Re: ReverseDataBind

        Well without going into too much detail...

        There are some new controls: SQLDataSource, AccessDataSourc e ,
        ObjectDataSourc e , XMLDataSource and SiteMapDataSour ce. You can then bind
        these to the various new databound controls by simply using the DataSourceID
        property. The datasource controls have a number of properties such as
        SelectCommand, UpdateCommend etc. that you can set to various SQL queries toi
        perform the SELECT, UPDATE, INSERT and DELETE actions you want. That way you
        can have a databound control, that keeps it's viewstate and can read, edit,
        insert and delete records without actually writing any code at all. Of
        course it gets a bit more complex if you want to do anything very usefull
        such as validating the users input etc, but it's still much much easier than
        ASP.net 1.1

        "Peter Morris [Droopy eyes software]" wrote:
        [color=blue]
        > How is it done in dotnet 2?
        >
        >
        >[/color]

        Comment

        • Peter Morris [Droopy eyes software]

          #5
          Re: ReverseDataBind

          Ah, that's no use to me then. The datasources in my case are object
          instances and not datasets or RDBMS tables :-(


          Comment

          Working...