473,803 Members | 3,306 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1229
ma
Thank,
I want to have a form view instead of a gridview.
Regards
"David Wier" <da*******@davi dwier.nospam.co mwrote in message
news:uJ******** ******@TK2MSFTN GP02.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.com wrote in message
news:ua******** ******@TK2MSFTN GP05.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
2809
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 Description"></asp:BoundColumn> <asp:TemplateColumn runat="server" HeaderText="Id Type Option" "> <itemtemplate> <asp:label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "TypeOption") %>' /> <asp:label runat="server" ID="LlbTypeOption" Visible=False...
4
3721
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 file via some editable controls such as text boxes , option boxes etc. how can i implment this , should i use another xslt file with <INPUT> controls . if so how can i save the result back using the asp.net
2
1879
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 controls). I control the visibility of the panels according to what mode the ascx is in.
1
1200
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 content on aspx pages and the database and edit every single outside link (and keep all new content that contain outside links up to date). I would like to grab the html before it's sent to the client, search for outside links, edit the links...
3
1454
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 aspx pages to be editable by a user. This saves me having to doing any of the changes. Should I give them access to a public folder for an HTML page that I then include in the website. What are the best ways to tackle this kind of
2
2550
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 implement it? Thanks. Regards,
1
2168
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 I have Categories and various Products in each Category. I'm trying to build a page to EDIT/UPDATE each product.I want to be able to change the Category that a product belongs to, but all I get in the drop-down menu is the one specific Category. ...
17
5478
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 when they login. Here is the edituser.asp code I have <%@ Language=VBScript %> <% Option Explicit %> <!--#include virtual="/adovbs.inc"--> <html> <body> <%
3
3546
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 sorting out a few glitches though. Since i upgraded from ms access database to MySQL, i have added about 4 articles to test the new setup. I note some fields aren't being added in the new mySql database for the new 4 records. When i ran the MySQK...
0
9700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10292
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9121
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7603
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6841
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.