?
Solved

view/edit form

Posted on 2011-02-28
8
Medium Priority
?
358 Views
Last Modified: 2012-05-11
I have a form that the user is able to view a product ... I want to add the capability to allow the user to click on a button and edit that product.  To do that the labels would have to be replaced with other controls (ex drop text boxes).  Would I be better of creating a whole new page for the edit or is there a way i could use the same page?
0
Comment
Question by:vbnetcoder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 11

Accepted Solution

by:
srikanthreddyn143 earned 2000 total points
ID: 34999472
You can use the same page. Instead of labels to show the data use textboxes and drop downs for updating . If you want to only show, disable them.
0
 

Author Comment

by:vbnetcoder
ID: 34999504
I suppose I could do that but the problem is disabled items don't show up clearly
0
 
LVL 12

Expert Comment

by:omegaomega
ID: 35001757
Hello, vbnetcoder,

Go with the solution that srikanthreddyn143 has suggested, but instead of disabling the controls, set the ReadOnly property of the TextBoxes to True, and replace any drop downs with a read-only TextBox.  (That is, put the drop-down and TextBox in the same location on the form, and hide or show whichever is appropriate for the current view/edit mode.

Cheers,
Randy
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Expert Comment

by:omegaomega
ID: 35001780
Hello, vbnetcoder,

Using this technique has the added advantage (over labels or disabled textboxes) that it allows the user to copy the contents of the TextBoxes to the clipboard.  

Cheers,
Randy
0
 

Author Comment

by:vbnetcoder
ID: 35001787
Is it possible to overlap controls?
0
 
LVL 12

Expert Comment

by:omegaomega
ID: 35002643
Hi, vbnetcoder,

Sorry, I was thinking Windows Forms, where overlapping controls is easy.  I'm not sure, but I think that if you place the controls adjacent to each other in the web page design, and only one is visible, then the other will shift into the position made available by the hidden control.  

I don't work with web forms so perhaps there are other issues with the technique of which I'm unaware.   Others may be able to provide more enlightenment, but a little testing will probably give you the answer in short order.

Cheers,
Randy

0
 

Author Comment

by:vbnetcoder
ID: 35002906
OK I will give it a try
0
 

Author Closing Comment

by:vbnetcoder
ID: 35036615
i ended up doing this.  worked just fine
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question