在datagrid的title字段列中超级链接到一个页面,此页面是个路径:http://192.168.192.252/ + 路径字段file_path,此路径下有对应的页面文件。半天没琢磨出来,帮帮忙!在线等待!

解决方案 »

  1.   

    使用超级链接列
    URL格式字符串:http://192.168.192.252/{0}
    URL字段:file_path
    文本字段:title
      

  2.   

    DataGrid中:
    <asp:HyperLinkColumn Target="_blank" DataNavigateUrlField="m_id" DataNavigateUrlFormatString="http://192.168.192.252/ + 路径字段file_path" DataTextField="m_title"></asp:HyperLinkColumn>
      

  3.   


    ItemDataBound事件e.Item.Cells[2].Text = "<a href='http://192.168.192.252/" + xxxx + "'>" + e.Item.Cells[2].Text + "</a>"
      

  4.   

    回复 sansan123(火柴):
       这种方法是过,运行起来后,在title字段就没有链接了!
      

  5.   

    e.Item.Attributes.Add("onclick","document.location.href('endit.aspx?No="+e.Item.Cells[0].Text+"&ds="+e.Item.Cells[1].Text+"')");
      

  6.   

    <A href='http://192.168.192.252/<%#DataBinder.Eval (Container.DataItem, 'file_path') %>'><%#DataBinder.Eval (Container.DataItem, "title") %></A>
      

  7.   

    sansan123(火柴) 
    赞成,
    来晚了。^_^
      

  8.   

    bluesmile979(笑着) 
    他的方法可以实现!
      

  9.   

    <asp:TemplateColumn>
    <ItemTemplate>
    <a href="">sadfasdfasdf</a>
    </ItemTemplate>
    </asp:TemplateColumn>
      

  10.   

    可能误解我的意思了,说得明白一点! 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 的值!怎么实现 ^_^