VS2005 - Run Code only in Read Only mode.

P

Phillip Vong

Using VS2005 / SQL 2000 / VB.NET 2 / ASPX
---------------------

I have a code that I want to run ONLY when the ReadOnly mode of Formview is
loaded. How do I do this. Since ReadOnly is the default load for Formview,
I can add the code to Page Load. In the Read Only mode,
I have a Label that displays something but it's only in the Read Only mode.
If I Edit something and then hit Update, I get an error saying object can
not be found. I tried adding the code to check to see if it's NOT postback
and the default mode is ReadOnly and that works but I get the same error
message when I go from Edit mode to Read mode. This has been bugging me for
awhile now and I decided it's time for me to find an answer to this.
Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top