Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/302.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 您能否使NavigateUrl直接指向URL中附加了动态参数的页面?_C#_Asp.net_Html_Forms_Web - Fatal编程技术网

C# 您能否使NavigateUrl直接指向URL中附加了动态参数的页面?

C# 您能否使NavigateUrl直接指向URL中附加了动态参数的页面?,c#,asp.net,html,forms,web,C#,Asp.net,Html,Forms,Web,我试图将某个对象中的某些内容附加到URL上,以便从中生成一个参数。目标是这样做: <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# String.Format("ArticleView.aspx?Name={0}", Eval("SomeName"))%>' ... /> articleview.aspx?Name=AwesomeSauce 在这里,我可以使用我指向的页面上的Name参数 我这里

我试图将某个对象中的某些内容附加到URL上,以便从中生成一个参数。目标是这样做:

<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# String.Format("ArticleView.aspx?Name={0}", Eval("SomeName"))%>' ... />
articleview.aspx?Name=AwesomeSauce

在这里,我可以使用我指向的页面上的Name参数

我这里有一些代码:

<asp:hyperlink Text=<%# DataBinder.Eval(Container.DataItem, "Title") %> NavigateUrl="ArticleView.aspx" </asp:hyperlink> 

尝试以下方法:

<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# String.Format("ArticleView.aspx?Name={0}", Eval("SomeName"))%>' ... />