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

N

ned.balzer

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top