LIKE US ON FACE BOOK

Thursday, 21 March 2013

Writing Conditional HTML tag for adding attributes in Asp.Net or Php or Java using ternary Operator.

Here is what I did..
while some task was assigned to me..

<input type=\"" + (this.applymobilelookandfeel ? "number" : "text") + "\" >


The this.applymobilelookandfeel is conditional statement using ternary(? :) operator.

Number will be if condition is true,else text if condition fails.


Any doubts Please do comment.will be glad to reply back.....