CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Label vs TextBox - Dynamically change

Print topic Send  topic

Author Message
mljonzs

Posts: 124
Posted: 02/09/2007, 2:36 PM

I'm really lousy at knowing what to look for in forums so this might be posted somewhere already??

I'm wondering if there is a way (an easy way) to have a field appear as a label under some circumstances - i.e., in Edit Mode and in other circumstances - i.e., Insert Mode - appear as a Text Box?

I know how to use a TextBox and set it to read only for the update/edit mode, but in Edit mode I don't want it to be a text box at all, only in InsertMode.

Can anyone help with this?

Thanks!
Michelle
_________________
What does not begin WITH God, will end in failure!
View profile  Send private message
peterr


Posts: 5971
Posted: 02/09/2007, 3:11 PM

You would need to hide one control and show another. Therefore your page would contain both.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
mljonzs

Posts: 124
Posted: 02/12/2007, 7:05 AM

Good, I'm on the right track anyway then. But can you tell me the best way to code to check for which mode the form is in? I.e. - How do I know if it is in edit mode or insert mode?

Thanks!
Michelle
_________________
What does not begin WITH God, will end in failure!
View profile  Send private message
wkempees


Posts: 1679
Posted: 02/13/2007, 7:38 AM

In CCS
Press Help
Search: Editmode

Function articles_OnValidate()

If articles.EditMode and IsEmpty(articles.modified_by.Value) Then
articles.Errors.AddError("The modified_by field cannot be empty when updating.")
End if

End Function

_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.