first, describe the usage of ASP in the past, which is also used in Asp.net. <% # %> is a usage introduced in Asp.net, this usage is not used in ASP.
example:
for example, form. in VB, I define a variable (to be global)
Public istg_xo as string = "ABC"
so I am at the front end from. this variable can be used anywhere in aspx ....
var xx = <% = istg_xo %>
alter
Another example: If I have a datatable in the background, I want to retrieve the changes of the field in this datatable in the foreground in sequence...
Background. CS (C #)
String message = string. empty;
Public getmessage ()
{
For (INT lint_row = 0; lint_row <datatable. Rows. Count; lint_row ++)
{
Message + = "Message [" + lint_row.tostring () + "] =" + idtb_temp.rows (lint_rows). Item ("xx1"). tostring () + ";";
// Generate the number of client messages for the front-end users...
}
}
The frontend uses the same method to retrieve this data group ....
The usage of <% # %> is simpler than that of other .....
For example, if I have a dataset... on the backend, I can use the content of any field in this dataset...
Usage:
TEXT = '<% # databinder. eval (container. dataitem, "dataset field name" %>'