Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

view/edit form

Posted on 2011-02-28
8
Medium Priority
?
359 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

609 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