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
Rameez Javed
NA
395
61.6k
Eval If else if and else
Feb 15 2020 6:56 AM
I'm done some conditions with if and else in eval on client side, but now im trying to do something like below, but I don't have the concept of else if in eval, if there is any way to do, urgently response will be highly appreciated.
style
=
'<%# If(Eval("Ranking").ToString() = "Economy", "width: 0%") : If(Eval("Ranking").ToString() = "EcoPlus", "width: 0%") : If(Eval("Ranking").ToString() = "Standard", "width: 0%") : If(Eval("Ranking").ToString() = "1 Star", "width: 20%") : If(Eval("Ranking").ToString() = "2 Star", "width: 40%") : If(Eval("Ranking").ToString() = "3 Star", "width: 60%") : If(Eval("Ranking").ToString() = "4 Star", "width: 80%") : If(Eval("Ranking").ToString() = "5 Star", "width: 100%") %>'
Here is a code snippet for if else only and I'm in need of If else if else if else if and else
Style
=
'<%# If(Eval("Ranking").ToString() = "Eco", "40%", "60%") %>'
Thanks in Advance
Reply
Answers (
3
)
How to make the treeview structure
ASP/MVC C# Master Detail