求教如何转送NavigateUrl="~/detailnews.aspx"+'<%# Eval("NewsTitle") %>' 参数
在datalist控件里,加上hyperlink的空间。。然后选择参数转递到另外一个页面。。但是参数格式不正确。。求达人帮助下阿。。
<asp:DataList ID= "DataList2 " runat= "server " DataKeyField= "NewsID " DataSourceID= "SqlDataSource1 " Height= "98px " Width= "542px " >
<ItemTemplate>
标题: <asp:HyperLink ID= "HyperLink1 " runat= "server " NavigateUrl= "~/detailnews.aspx "+ ' <%# Eval( "NewsTitle ") %> '
Text= ' <%# Eval( "NewsTitle ") %> '> </asp:HyperLink>
时间: <asp:Label ID= "Label2 " runat= "server " Text= ' <%# Eval( "NewsDate ") %> ' Width= "294px "> </asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:HyperLink ID= "HyperLink2 " runat= "server " NavigateUrl= 'detailnews.aspx '
Text= '浏览更多... '> </asp:HyperLink>
</FooterTemplate>
<AlternatingItemTemplate>