我正在尝试在使用Classic ASP生成的链接中插入变量的文本,但到目前为止,我正在罢工。我正在尝试链接到包含订单ID作为链接一部分的另一个页面。链接本身显示正确,但strOID未插入链接。
是否有更简洁,更紧凑的方式来生成嵌入变量的链接?
http://localhost/orderreview.asp?oid=/
我的代码是:
<%
Dim strOID
if not rs.EOF then
do
strOID = rs("oid_num")
Response.Write "<tr><td width='12%'><a href='orderreview.asp?oid=' & strOID & ' onclick=showPopup(this.href);return(false);'>" & strOID
Response.Write "</a></td>"
rs.MoveNext
if rs.EOF then exit do
loop
end if
%>
答案 0 :(得分:3)
注意添加双引号...第一个终止字符串的第一部分,以便OpenCV Error: Insufficient memory (Failed to allocate 11059200 bytes)
...
cv::Mat::create(int, const int*, int)]
at org.opencv.core.Mat.n_Mat(Native Method)
at org.opencv.core.Mat.<init>(Mat.java:50)
和字符串的其余部分可以连接。
public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
Mat src = inputFrame.rgba();
// insufficient memory error here?
Mat dest = new Mat(src.size(), src.type());
Imgproc.threshold(src, dest, 30, 255, Imgproc.THRESH_BINARY);
return dest;
}
抱歉,string interpolation没有方便。
答案 1 :(得分:0)
User212514's method would work perfectly well. An alternative would be to exit your asp scriptlet and start another one later, so you could simply code your repeaded region in HTML
This is probably easier to code if you're using an html editor with syntax highlighting - especially if your repeated region is more complex than a single table row.
Note that you can use the construction <%= yourvariable %>
to insert an asp variable into your html. the = sign is shorthand for Response.Write.
Using this method, your code would look like this
<%
Dim strOID
do while not rs.eof
strOID = rs("oid_num")
%>
<tr><td width="12%"><a href="orderreview.asp?oid=<%=strOID %>" onclick="showPopup(this.href);return(false);"><%=strOID %></a></td></tr>
<%
rs.MoveNext
loop
%>