Columns not bound to DetailsView get set to NULL on update

Discussion in 'ASP General' started by Nick Bennett, Jan 20, 2008.

  1. Nick Bennett

    Nick Bennett Guest

    I've got a page with a DetailsView. It uses a SqlDataSource which itself
    uses stored procedures for Select and Update.

    I don't want the user to see some of the columns, but if I don't bind them
    (or if I do bind them but set Visible=False), when the Update procedure is
    called, the parameters corresponding to the columns that weren't bound to the
    DetailsView are all null.

    This can't be an uncommon scenario, so I guess I have missed something. Any
    ideas?
     
    Nick Bennett, Jan 20, 2008
    #1
    1. Advertising

  2. Nick Bennett wrote:
    > I've got a page with a DetailsView.


    There was no way for you to know it (except maybe by browsing through some
    of the previous questions in this newsgroup before posting yours - always a
    recommended practice) , but this is a classic asp newsgroup. ASP.Net bears
    very little resemblance to classic ASP so, while you may be lucky enough to
    find a dotnet-knowledgeable person here who can answer your question, you
    can eliminate the luck factor by posting your question to a group where
    those dotnet-knowledgeable people hang out. I suggest
    microsoft.public.dotnet.framework.aspnet or the forums at www.asp.net.
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Jan 20, 2008
    #2
    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.
Similar Threads
  1. Mario Krsnic
    Replies:
    0
    Views:
    386
    Mario Krsnic
    Jun 23, 2006
  2. Ismail
    Replies:
    3
    Views:
    5,609
    Marc BICHARA
    Oct 22, 2008
  3. Terry Holland
    Replies:
    9
    Views:
    216
    Steven Cheng[MSFT]
    Oct 28, 2005
  4. Vinki

    template columns and bound columns in gridview

    Vinki, Apr 25, 2007, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    876
    Vinki
    Apr 25, 2007
  5. Replies:
    0
    Views:
    329
Loading...

Share This Page