Friday, February 24, 2012

Inserting records using the details view or programmatically

I'm a new user to vwd.

If I use a details view control on my page, I have noticed that the "New" link is not visible unless there is at least one record in the table. Is there any way of making it visible where there aren't any records?

My web pages are currently hosted at vwdhosting. I have uploaded my database with the record structure onto the web site and I am using a remote connection string to access it. I have had users updating data in another table on the remote database. If I add records to my new table locally and upload the database to the remote site, all the data that my users have been adding will be lost.

So, if I can't add my first record using a control on my web page when there are no records in the table, should I be doing it programmatically? If so, how?

Thanks,

Julie

Use the empty template. Add a button, that has a commandname of "New".

I usually use something like:

No records found, <asp:button ...>Add a new record</asp:button>

as the empty template.

|||Fabulous, thank you.

No comments:

Post a Comment