Just use a CompareValidator and make sure the value is NotEqual to the
0 element value. Set the Display = None and the error will show up in
your validation summary.
On 6/9/05, Falls, Travis D (HTSC, CASD) <[EMAIL PROTECTED]> wrote:
> Hi All,
> I am using the Validation Summary control and several validation controls.
> I have a link button that I want to use to add an item. This is only valid
> if an item is selected from a drop down.
> The link button calls a method onClickAddDestination. I want to check there
> and if nothing was selected, meaning element 0 in the drop down is still the
> selected index I want to add a message to the validation summary and display
> it. Does anyone know how I can do this?
>
> protected void onClickAddDestination(object o,
> CommandEventArgs e) {
> if(RAFTID_DD.SelectedIndex == 0) {
> /*
> * Validation Summary stuff
> */
> }
> }
>
> Travis D. Falls | Consultant RAFT.Net IT | 860.547.4070 |
> [EMAIL PROTECTED]
>
>
>
> *************************************************************************
> PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is
> for the exclusive use of addressee and may contain proprietary,
> confidential and/or privileged information. If you are not the intended
> recipient, any use, copying, disclosure, dissemination or distribution is
> strictly prohibited. If you are not the intended recipient, please notify
> the sender immediately by return e-mail, delete this communication and
> destroy all copies.
> *************************************************************************
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
--
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/