Solved

view/edit form

Posted on 2011-02-28
8
347 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
  • 4
  • 3
8 Comments
 
LVL 11

Accepted Solution

by:
srikanthreddyn143 earned 500 total points
Comment Utility
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
Comment Utility
I suppose I could do that but the problem is disabled items don't show up clearly
0
 
LVL 12

Expert Comment

by:omegaomega
Comment Utility
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
 
LVL 12

Expert Comment

by:omegaomega
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:vbnetcoder
Comment Utility
Is it possible to overlap controls?
0
 
LVL 12

Expert Comment

by:omegaomega
Comment Utility
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
Comment Utility
OK I will give it a try
0
 

Author Closing Comment

by:vbnetcoder
Comment Utility
i ended up doing this.  worked just fine
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now