Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the purpose of angle bracket percent in html

I just wanted to know what <% these exactly do? %> I've used these for exporting some html tables and data to excel, but i don't really know what it's function is. any answers are appreciated.

so like when i use these in below coding, am i actually using asp?

<body>
<%
    String exportToExcel = request.getParameter("exportToExcel");
    if (exportToExcel != null && exportToExcel.toString().equalsIgnoreCase("YES")) { //application/vnd.ms-excel
        response.setContentType("application/vnd.ms-excel"); //application/vnd.opentextformatsofficedocument.spreadsheetml.sheet
        response.setHeader("Content-Disposition", "inline; filename=" + "whatever.xls");
    }
%>

i got it from http://www.quicklyjava.com/export-web-page-to-word

like image 809
learningAlways Avatar asked Dec 15 '25 18:12

learningAlways


1 Answers

Answered over here: Name for Angle Bracket Percent Sign. Which then links to another answer.

In short, they are code render blocks which execute when the page is rendered. They are expressions as a part of the ASP.net framework, from what I can gather.

More information: here

EDIT: As others have commented, I found all this from a quick search.

like image 187
James W Avatar answered Dec 17 '25 11:12

James W



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!