TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Azaad Abbas
NA
221
41.5k
Why Required Field not working for dropdownlist?
Mar 26 2015 2:39 AM
<%--for this working--%>
<asp:UpdatePanel ID="upddlPackPeriod" runat="server"><ContentTemplate>
<asp:dropdownlist ID="ddlPackPeriod" runat="server" AutoPostBack="True" onselectedindexchanged="ddlPackPeriod_SelectedIndexChanged" TabIndex="9">
<asp:ListItem Value="0">Select</asp:ListItem>
<asp:ListItem Value="Monthly">Monthly</asp:ListItem>
<asp:ListItem Value="Quarterly">Quarterly</asp:ListItem>
<asp:ListItem Value="HalfYearly">HalfYearly</asp:ListItem>
<asp:ListItem Value="Yearly">Yearly</asp:ListItem>
</asp:dropdownlist>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlPackPeriod" />
</Triggers>
</asp:UpdatePanel>
<asp:RequiredFieldValidator ID="regPackPeriod" ControlToValidate="ddlPackPeriod" InitialValue="0" ErrorMessage="*Please Select Period" runat="server" ForeColor="Red"></asp:RequiredFieldValidator>
<%--for this not working--%>
<asp:UpdatePanel ID="upddlPayBy" runat="server"><ContentTemplate>
<asp:dropdownlist ID="ddlPayBy" runat="server"
onselectedindexchanged="ddlPayBy_SelectedIndexChanged" TabIndex="18" AutoPostBack="True">
<asp:ListItem Selected="True">SELECT</asp:ListItem>
<asp:ListItem Value="cash">Cash</asp:ListItem>
<asp:ListItem Value="cheque">Cheque</asp:ListItem>
</asp:dropdownlist>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlPayBy" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
<asp:RequiredFieldValidator ID="reqddlPayBy" runat="server" ControlToValidate="ddlPayBy" InitialValue="0" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
Reply
Answers (
4
)
single database with different table
how do I filter data from gridview which binded by dataset