Re: Show/Edit on one page: Best option

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Look into the Gridview - it has display and edit capabilities built in:
http://www.aspnet101.com/aspnet101/aspnet/codesample.aspx?code=GvNoCodeEdit

Also another way, if you would like it in a Master/Detail fashion, you could
use a DetailsView, along with a Gridview:
http://www.aspnet101.com/aspnet101/aspnet/codesample.aspx?code=MasterDetail20

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup


"ma" <ma@xxxxxxxxxxx> wrote in message
news:uaSGBpQAIHA.5652@xxxxxxxxxxxxxxxxxxxxxxx
Hello,

I want to have a page that displays the fields of a record of a
database. When user press 'Edit' button, he would be able to edit the
data. What is the best way to do this?



What I can suggest is to show the fields using label controls and when
user press 'Edit', replace the labels with TextBox controls (setting
visible property of Labels to false and TextBox to true).



Is there any better way to do this?



Regards




.


Quantcast