473,387 Members | 1,529 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Show/Edit on one page: Best option

ma
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
Sep 27 '07 #1
1 1203
ma
Thank,
I want to have a form view instead of a gridview.
Regards
"David Wier" <da*******@davidwier.nospam.comwrote in message
news:uJ**************@TK2MSFTNGP02.phx.gbl...
Look into the Gridview - it has display and edit capabilities built in:
http://www.aspnet101.com/aspnet101/a...e=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/a...MasterDetail20

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with
no bloated markup
"ma" <ma@nowhere.comwrote in message
news:ua**************@TK2MSFTNGP05.phx.gbl...
>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



Sep 27 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Stanley J Mroczek | last post by:
How do you load a dropdownlist when edit is clicked in a datagrid ? <Columns> <asp:BoundColumn DataField="OptionDescription" ItemStyle-Wrap="True" HeaderText="Option...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
2
by: Martin | last post by:
Hi, I want to create a number of ascx controls with edit and view modes. Previously I have put two panels in the ascx - one for view (with label subcontrols), and one for edit (with text box...
1
by: J. Shane Kunkle | last post by:
A customer would like to redirect visitors to a "goodbye" page when they click on an outside link on their website. The website is quite large and I would rather not wade thru all the existing...
3
by: Neil Steventon | last post by:
Hi, Im after some advise on how to go about this problem. I have a master page with nice header and side bar setup. I then have various aspx pages that use this master page. I want one of the...
2
by: ruthie | last post by:
Hi, I have a gridview with edit option. If the user chooses to edit the row and then press the Cancel button - I would like the focus to return to the chosen row. Someone has any idea how to...
1
by: ollielaroo | last post by:
Hi guys, Firstly I did do a search for this one first but I couldn't find anything related in this forum. I am using Dreamweaver MX and trying to build admin pages for an ASP site. My problem is...
17
by: jerrydigital | last post by:
Hello, I have an edit user page that allows the user to view their user information and make changes if possible. I have a simple html login page that directs to an asp page called edituser.asp...
3
by: janetopps | last post by:
I have a news website, with asp pages, which was on Access, and i upgraded to MySQL, i used Bullzip to transfer the data. It had about 1000 pages, which im now able to pull up on the public side. Im...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.