DetailsView With no Record

H

hon123456

Dear all,

I have setup a DetailsView with sqlDataSource. But the
DetailsView will be visible only where there is a record. What I want
is to show the Detailsview first which can add a new record
.. That means I want the Detailsview with New Hyper Link when it first
Starts. How can I do that?

Thanks.
 
C

Coskun Sunali [MVP]

Hi,

After binding the data, or by hooking to the "DataBound" event of the
Details view (must be something like that, not 100% sure though), you can
see if the DetailsView has any data item assigned to it. If not, you can
switch it to "New record" mode programmatically.
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top