Is it possible to do things in a PHPish way in ASP.Net? I’ve seen <%= %> but I’ve tried it and couldn’t get it to work.
The PHPish equivalent of what I want to do is
<script src="<?php echo ResolveUrl("jquery/js/jquery.js"); ?>"></script>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, it’s quite possible. You should familiarize yourself with all the variations of the (so called) alligator tags though.
Put code in between
<% %>blocks. The<%= %>variant is a shortcut forResponse.Write, and is used as a shortcut for directly outputting a variable to the page.The following should work, as long as ResolveUrl is returning a string. Notice there is no “;” to end the line though.