pokazuje okno komunikatu na modalnym rozszerzeniu wyskakującym sterowania

Mam kontrolę na stronie, która ma następujące modalne rozszerzenie popup:

<asp:Panel ID="pnl_Completed" runat="server">
    <asp:Image ID="exit_Completed" runat="server" ImageUrl="" />
    <h3 style="text-align:center;">Completed</h3>
    <asp:Panel ID="pnl_inner" runat="server">
    <table style="width:100%;height:100%" cellpadding="5px"> 
        <tr style="height:40px;">
            <td valign="top">Comment: </td>
            <td>
            <telerik:RadTextBox ID="txt_CompletedComment" runat="server" TextMode="MultiLine" Rows="6" Width="400" Height="100"></telerik:RadTextBox>        
            </td>
        </tr>
        <tr style="height:40px;">
        <td colspan="2" align="center"><asp:Button id="btn_SaveCompleted" runat="server" Text="Complete" OnClick="btn_SaveCompleted_Click" /></td>
        </tr>
    </table> 
    </asp:Panel>

</asp:Panel>
<cc1:ModalPopupExtender ID="ModalPopupExtender_Completed" runat="server"  PopupControlID="pnl_Completed" CancelControlID="exit_Completed" TargetControlID="dummy_btn_Completed" >
</cc1:ModalPopupExtender>

<asp:Button id="dummy_btn_Completed" runat="server" CssClass="display_none" />

Chcę pokazać okno wiadomości na zdarzeniu btn_SaveCompleted_Click, gdy pole tekstowe jest puste. Próbowałem tego:

 If txt_CompletedComment.Text.Trim().Length = 0 Then
            ScriptManager.RegisterStartupScript(Me, Me.GetType, "key", "alert('Please enter a comment.');", True)
 End If

ale to nie działa, tylko ukrywa modalne rozszerzenie popup, bez błędów. Czy robię to źle? Czy jest jakiś inny sposób, aby to pokazać?

questionAnswers(1)

yourAnswerToTheQuestion