|
Home > Archive > Microsoft Content Management Server > May 2005 > Validating a normal textbox on a page
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Validating a normal textbox on a page
|
|
| johnduffy75@yahoo.ie 2005-05-26, 5:55 pm |
| Hi i've just placeed two textboxes below a standard HTML placeholder of
which need to be filled in before a user completes a save. I'm using
the RequiredFieldValidator on the textbox, but this doesn't seem to
stop the save from occuring if the textboxes are empty. It just pumps
out the validate error when the save has been done and u are redirected
back to the page in unpublished mode?
Is there anyway around this so that the save doesnt get carried out and
the validator returns the error message in edit mode???
Would be grateful of any help...
Thanks in advance..
John.
| |
| Stefan [MSFT] 2005-05-26, 5:55 pm |
| Hi John,
you need to create modified save and save&exit console actions which only do
the save if the validation succeeded.
You can find such console actions in the following sample:
http://www.gotdotnet.com/Community/...4F-2CCA72FF4704
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
<johnduffy75@yahoo.ie> wrote in message
news:1117125785.203852.122560@g47g2000cwa.googlegroups.com...
> Hi i've just placeed two textboxes below a standard HTML placeholder of
> which need to be filled in before a user completes a save. I'm using
> the RequiredFieldValidator on the textbox, but this doesn't seem to
> stop the save from occuring if the textboxes are empty. It just pumps
> out the validate error when the save has been done and u are redirected
> back to the page in unpublished mode?
>
> Is there anyway around this so that the save doesnt get carried out and
> the validator returns the error message in edit mode???
>
> Would be grateful of any help...
> Thanks in advance..
> John.
>
| |
| johnduffy75@yahoo.ie 2005-05-27, 7:56 am |
| Thanks Stefan but i just want to validate text boxes and not
placeholders as per the sample you gave me. Is it the case that i will
have replace the textboxes with placeholders in order to validate them
RE your sample.
Just another thing, will your sample only work with XML placeholders or
is it applicable to HTML placeholders aswell.
Thanks
John.
Stefan [MSFT] wrote:[vbcol=seagreen]
> Hi John,
>
> you need to create modified save and save&exit console actions which only do
> the save if the validation succeeded.
> You can find such console actions in the following sample:
> http://www.gotdotnet.com/Community/...4F-2CCA72FF4704
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> New to MCMS?
> Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
> ----------------------
>
>
> <johnduffy75@yahoo.ie> wrote in message
> news:1117125785.203852.122560@g47g2000cwa.googlegroups.com...
| |
| Stefan [MSFT] 2005-05-27, 7:56 am |
| Hi John,
as indicated this sample contains the necessary console actions.
I did not mean you should take all the code.
Just the console actions.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
<johnduffy75@yahoo.ie> wrote in message
news:1117192320.710717.120270@z14g2000cwz.googlegroups.com...
> Thanks Stefan but i just want to validate text boxes and not
> placeholders as per the sample you gave me. Is it the case that i will
> have replace the textboxes with placeholders in order to validate them
> RE your sample.
>
> Just another thing, will your sample only work with XML placeholders or
> is it applicable to HTML placeholders aswell.
>
> Thanks
> John.
>
>
>
> Stefan [MSFT] wrote:
>
|
|
|
|
|