This topic is locked

How to bar using Edit or InLine Edit

5/3/2008 3:12:09 PM
ASPRunnerPro General questions
Stu author

If the user presses Edit or Inline Edit and one of the fileds in my table has a certain value then I want to Cancel the Edit page and write a message.
It doesn't seem to me that any of the Edit events carries the "Dict" object as a passed parameter so I can implement an If statement like:-
If Dict("NoEdit")=-1 then
Write Message

Set Edit to False

*** Redirect back to table display page.
Any advice how to stop the Edit page from loaded based on a condition, or close it if a condition exists?
Regards,
Stuart

J
Jane 5/5/2008

Stuart,
try to use this code in the Before record updated event:

if dict("NoEdit")=-1 then

response.write "error"

BeforeEdit = False

else

BeforeEdit = True

end if

Stu author 5/6/2008

Stuart,

try to use this code in the Before record updated event:


Jane, thanks it worked but ONLY if I changed the test "=-1" into "<0". My guess is that the script language doesn't see "=" as true equivalence.
Anyhow, I have it working to my satisfaction.
Regards,
Stu