Solved

view/edit form

Posted on 2011-02-28
8
354 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
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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

808 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