如何将Databse中的列链接到....? [英] How to link a column in Databse to .... ?

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

问题描述

嗨 我有评论系统::

我有一个页面显示刚刚出现的最新评论(评论标题),并且当用户单击它时,应将其重定向到相关帖子(它自己的帖子)

解决方案

一个简单的解决方案



我假设您正在使用网格视图或类似的视图....
将标题列设置为TemplateColumn,然后在Item Template内执行以下操作...

< itemtemplate>
]]>


即方法名称或标记名称可能不正确...


对不起. title =

< a href = " ><![CDATA [<%= commentid %> ]] >  "  >   a   解决方案 

a simple solution, title.in code behide,you declare public string commandid. and static string command(call database... return values)....
inside commentdetail.aspx, you declare a variable. int id= int.parse(request.querystring["id"].tostring());....


Hi
I assume that you are using a grid view or something like that....
Make the title column to TemplateColumn and inside Item Template do the following...

<itemtemplate>
]]>


i.e. Method names or tag name may be incorrect...


sorry. title =

<a href="commentdetails.aspx?id="><![CDATA[<%=commentid%>]]>""></a>


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

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