DataGrid问题:超链接 在datagrid的title字段列中超级链接到一个页面,此页面是个路径:http://192.168.192.252/ + 路径字段file_path,此路径下有对应的页面文件。半天没琢磨出来,帮帮忙!在线等待! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 使用超级链接列URL格式字符串:http://192.168.192.252/{0}URL字段:file_path文本字段:title DataGrid中:<asp:HyperLinkColumn Target="_blank" DataNavigateUrlField="m_id" DataNavigateUrlFormatString="http://192.168.192.252/ + 路径字段file_path" DataTextField="m_title"></asp:HyperLinkColumn> ItemDataBound事件e.Item.Cells[2].Text = "<a href='http://192.168.192.252/" + xxxx + "'>" + e.Item.Cells[2].Text + "</a>" 回复 sansan123(火柴): 这种方法是过,运行起来后,在title字段就没有链接了! e.Item.Attributes.Add("onclick","document.location.href('endit.aspx?No="+e.Item.Cells[0].Text+"&ds="+e.Item.Cells[1].Text+"')"); <A href='http://192.168.192.252/<%#DataBinder.Eval (Container.DataItem, 'file_path') %>'><%#DataBinder.Eval (Container.DataItem, "title") %></A> sansan123(火柴) 赞成,来晚了。^_^ bluesmile979(笑着) 他的方法可以实现! <asp:TemplateColumn> <ItemTemplate> <a href="">sadfasdfasdf</a> </ItemTemplate></asp:TemplateColumn> 可能误解我的意思了,说得明白一点! title字段和file_path字段在表NewsInfo中,每个title对应相应的file_path,现在我要在datagrid中点击某一行的title,便要连接到 http://192.168.192.252/ + 对应的字段file_path页面,其中file_path是个相对路径,包括文件名!比如:http://192.168.192.252/xt_prod/20050111001/1.html,其中xt_prod/20050111001/1.html 便是字段file_path 的值!怎么实现 ^_^ 附件文件名过长导致下载时不能直接打开,这个怎么解决? 为什么无法在文本框的输入中过滤HTML标记 高手请帮忙~~急急急!!!请进!! 200分求sqldatasource参数问题 Codebehind的反编译问题 如何得到图片文件的分辨率 将oracle数据库中的中文写到网页上的乱码问题 这问题搞的我今天晚上睡不成了 <a href ="home.aspx?cn="><asp:Label ID="Label12" runat="server"></asp:Label></a> 如何让droplist可以编辑 水晶报表的折线图问题 想做一个简单的公司网站,不知道怎么做高手请多多指点!!!
URL格式字符串:http://192.168.192.252/{0}
URL字段:file_path
文本字段:title
<asp:HyperLinkColumn Target="_blank" DataNavigateUrlField="m_id" DataNavigateUrlFormatString="http://192.168.192.252/ + 路径字段file_path" DataTextField="m_title"></asp:HyperLinkColumn>
ItemDataBound事件e.Item.Cells[2].Text = "<a href='http://192.168.192.252/" + xxxx + "'>" + e.Item.Cells[2].Text + "</a>"
这种方法是过,运行起来后,在title字段就没有链接了!
赞成,
来晚了。^_^
他的方法可以实现!
<ItemTemplate>
<a href="">sadfasdfasdf</a>
</ItemTemplate>
</asp:TemplateColumn>