How to set some default values in DetailsView in insert mode?

Discussion in 'ASP .Net Web Controls' started by ned.balzer@gmail.com, Jun 21, 2006.

  1. Guest

    Hi,

    I am hoping someone has some sample code which would do this. For
    example, assume a simple detailsview that shows a Name, address, city,
    state, zipcode and date of entry. When the detailsview is in insert
    mode, all of the fields will be blank and editable; when the form is
    filled out the fields' contents are written to the database table. But
    I'd want the name to be drawn by default from a session variable, the
    date of entry to display today's date, and the state to be a dropdown
    with 50 states, from AK to WY. So I'd need to prepopulate the date
    (with Today()), the name (with Session("name")) and the state dropdown
    (with a query to a database table).

    Is this difficult to do in asp.net 2.0? Is it even possible?

    Thanks in advance.

    NB
     
    , Jun 21, 2006
    #1
    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. cannontrodder
    Replies:
    1
    Views:
    740
    cannontrodder
    Jul 25, 2006
  2. Nirmal Singh
    Replies:
    1
    Views:
    1,338
    Richard Humphrey
    Oct 13, 2010
  3. rodchar
    Replies:
    3
    Views:
    3,135
    rodchar
    Jun 9, 2008
  4. Feege
    Replies:
    0
    Views:
    485
    Feege
    Dec 20, 2005
  5. mt
    Replies:
    1
    Views:
    312
    Phillip Williams
    Apr 10, 2006
Loading...

Share This Page