3

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

1 Answers1

1

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.

Community
  • 1
  • 1
James W
  • 26
  • 3