Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4556418
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:21:46+00:00 2026-05-21T17:21:46+00:00

I have a dropdown list on my aspx page on which I have a

  • 0

I have a dropdown list on my aspx page on which I have a RequiredFieldValidator applied over it. DropDown code is:

<asp:DropDownList ID="ddlglCategoryId" runat="server" CssClass="textEntry2" 
                                            AutoPostBack="true" ValidationGroup="Save" DataSourceID="dtsglCategoryId" DataTextField="LookupItem"
                                            DataValueField="Id" AppendDataBoundItems="true">
                                            <asp:ListItem Text="All" Selected="True" Value="0"></asp:ListItem>
                                        </asp:DropDownList>

RequiredFieldValidator code is:

<asp:RequiredFieldValidator ID="rfvddlglCategoryId" InitialValue="0" runat="server"
                                            ErrorMessage="Please select category" CssClass="Validations" ControlToValidate="ddlglCategoryId"
                                            ValidationGroup="Save" Display="Dynamic" SetFocusOnError="true">
                                        </asp:RequiredFieldValidator>

I have a post back trigger as well on my aspx page and when I change the category from the dropdown, page posts back and a grid on my page gets updated. But due to post back, the validator message appears and then disappears. I want this to appear only when “All” is selected from dropdown and user clicks save button.

Any guidelines?

Trigger:

</ContentTemplate>
    <Triggers>
        <%--<asp:AsyncPostBackTrigger ControlID="lbFileName" />--%>
        <asp:PostBackTrigger ControlID="btnFileUploadSave" />
    </Triggers>
</asp:UpdatePanel>

Button:

<asp:ImageButton ID="btnFileUploadSave" runat="server" ValidationGroup="Save"
                                                                        ImageUrl="~/App_Themes/Default/images/update.png" ToolTip="Save"  
                                                                        Height="18px" onclick="btnFileUploadSave_Click"/>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T17:21:47+00:00Added an answer on May 21, 2026 at 5:21 pm

    You may need to set the AutoPostBack property of the dropdownlist to false. It sounds like a postback is getting fired with the OnSelectedIndexChanged event handler.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a this aspx-code: (sample) <asp:DropDownList runat=server ID=ddList1></asp:DropDownList> With this codebehind: List<System.Web.UI.WebControls.ListItem> colors
I have small page which has label, DropDownList and a submit button. <div> <asp:label
I have dropdown list on my aspx page. I want to mannually set the
I have an aspx page on which there is a Loginview control. I put
Scenario: I have a page which contains a dropdownlist and a table which contains
I have a cascading dropdown list on my page. The first dropdown contains a
I have a dropdown list on my form which should filter out or display
In my aspx page I have drop down list that initialy in page load
I have a WebForm before_adm.aspx.cs which has the code as follows: . . .
I have dropdown list control in one of my application and when I add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.