asp.net - <%= %> embedded in Javascript IF Condition -


एएसपीएक्स पृष्ठ में:

  यदि (& lt;% = not me.ThisVisa.PassportExpirationDate माइक्रोसॉफ्ट जेस्क्रिप्ट रनटाइम त्रुटि: 'ट्रू' अपरिभाषित है  

मैंने इसे करने की कोशिश की: <

त्रुटि:

/ P>

  यदि ("& lt;% = Me.ThisVisa.PassportExpirationDate.IsNull.ToString% & gt;"! = "सत्य") { 

.. लेकिन मुझे एक संकलन समय त्रुटि मिलती है:

  त्रुटि 5 विकल्प सख्त पर 'स्ट्रिंग' से 'लांग' तक अन्तर्निहित रूपांतरणों की अनुमति नहीं देता है  

सहायता!

लॉजिक को सर्वर स्क्रिप्ट में ले जाने पर विचार करें। ऐसा करने से आपको पृष्ठ पर कितना जावास्क्रिप्ट कम करना पड़ेगा।

  & lt;% यदि नहीं I.ThisVisa.PassportExpirationDate.IsNull फिर% & gt; // जावास्क्रिप्ट भलाई & lt;% अंत अगर% & gt;  

Comments

Popular posts from this blog

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -

gtk - Python Window Resize -

c# - read full xml file data over tcp -