如何在response.write中写入链接 [英] How can write link in response.write

查看:96
本文介绍了如何在response.write中写入链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

回复于( < TD> 中);

Response.Write(< a href ='023-EditCi.aspx?id ='>< / a>);

Response.Write(< / td>);



我尝试了什么:



我需要将id发送到另一页。这段代码只给出了带有链接的列。

解决方案

嗯...这是一个链接。问题是在 id 的文本之后没有任何内容,并且在开始和结束A标签之间没有任何内容。

< a href ='023-EditCi.aspx?id = ????????'> ????????< / a> 





所以,这是简单的字符串操作。您必须为 id 输入一个值,并且可选择为链接添加一些文本。



你可以使用字符串连接或StringBuilder来构建整个A标记。<​​/ blockquote>

Response.Write("<td>");
Response.Write("<a href='023-EditCi.aspx?id='></a>");
Response.Write("</td>");

What I have tried:

I need send id to another page. This code give me just column with out link.

解决方案

Ummm...that IS a link. The problem is that is nothing after the text for id and nothing between the opening and closing A tags.

<a href='023-EditCi.aspx?id=????????'>????????</a>



So, this is simple string manipulation. You have to put a value in for id and, optionally, some text for the link.

You can use either string concatenation or a StringBuilder to build the entire A tag.


这篇关于如何在response.write中写入链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆