Cant get data from template column into database

Discussion in 'ASP .Net' started by =?Utf-8?B?Sk1B?=, Aug 31, 2005.

  1. I have a detail view that i use for database updates. The regular fields work
    fine. I created a few drop down list templates and they dont seem to update
    the database for some reason. I have tried to name the sql variables after
    the dropdown list ID and it still doesnt work. Any ideas would help.
     
    =?Utf-8?B?Sk1B?=, Aug 31, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?Sk1B?=

    Brock Allen Guest

    If you're using ASP.NET v1.1 then you have to write the code to read the
    data from the control on postback and do the DB access manually. In 2.0 this
    is built in with two-way databinding using the new <%# Bind() %> syntax.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > I have a detail view that i use for database updates. The regular
    > fields work fine. I created a few drop down list templates and they
    > dont seem to update the database for some reason. I have tried to name
    > the sql variables after the dropdown list ID and it still doesnt work.
    > Any ideas would help.
    >
     
    Brock Allen, Sep 1, 2005
    #2
    1. Advertising

  3. I found the issue. It is because of the "bind" selected value. My other issue
    is how do you handle this when the database has a null value for that field.
    There is no seleceted value. I am using 2.0

    "Brock Allen" wrote:

    > If you're using ASP.NET v1.1 then you have to write the code to read the
    > data from the control on postback and do the DB access manually. In 2.0 this
    > is built in with two-way databinding using the new <%# Bind() %> syntax.
    >
    > -Brock
    > DevelopMentor
    > http://staff.develop.com/ballen
    >
    >
    >
    > > I have a detail view that i use for database updates. The regular
    > > fields work fine. I created a few drop down list templates and they
    > > dont seem to update the database for some reason. I have tried to name
    > > the sql variables after the dropdown list ID and it still doesnt work.
    > > Any ideas would help.
    > >

    >
    >
    >
    >
     
    =?Utf-8?B?Sk1B?=, Sep 1, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page