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
Binh Vo
NA
1
575
How to not show on Label when change dropdownlist if duplica
Jun 24 2015 12:24 AM
Following my title, I don't know why it not working. Please help me !. Please show code if need. here my code
<asp:DropDownList ID="ddl" runat="server" ClientIDMode="Static" OnSelectedIndexChanged="ddl_SelectedIndexChanged"></asp:DropDownList>
<asp:Label ID="label" runat="server" ClientIDMode="Static" CssClass="field" Width="150px"></asp:Label>
<script type="text/javascript">
$(function () {
$("#ddl").change(function (e)
{
var itemExists = false;
var txt = $("#label").val();
e.preventDefault();
$("#ddl option").each(function () {
if ($(this).text() == $.trim(txt))
{
itemExists = true;
alert('Item already exists'
); }
});
}); });
</script>
Reply
Answers (
1
)
export data into excel in mvc 5
How to delte an array from collection using mvc and mongo db