Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/338.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# 如何在vb.net中通过代码隐藏设置html对象(标记)值_C#_Html_Asp.net_Vb.net - Fatal编程技术网

C# 如何在vb.net中通过代码隐藏设置html对象(标记)值

C# 如何在vb.net中通过代码隐藏设置html对象(标记)值,c#,html,asp.net,vb.net,C#,Html,Asp.net,Vb.net,我有以下代码 在这里,我想设置vb.net中代码隐藏中的数据值。我在aspx页面中使用了文本,并将html文本放入代码隐藏页面中 Literal1.Text=”“为什么要用C#标记?你能解释一下吗?是否要获取/download/test.pdf作为输出?或者您想将/download/test.pdf更改为特定值并将整个字符串作为输出吗?此数据值应该是动态的。因此,在后端,我还可以将数据值设置为/download/Test2.pdf。我不确定您想做什么。尝试以下操作:Dim str As Stri

我有以下代码


在这里,我想设置vb.net中代码隐藏中的数据值。

我在aspx页面中使用了文本,并将html文本放入代码隐藏页面中


Literal1.Text=”“

为什么要用C#标记?你能解释一下吗?是否要获取/download/test.pdf作为输出?或者您想将/download/test.pdf更改为特定值并将整个字符串作为输出吗?此数据值应该是动态的。因此,在后端,我还可以将数据值设置为/download/Test2.pdf。我不确定您想做什么。尝试以下操作:Dim str As String=”“Dim str2 As String=System.Text.RegularExpressions.Regex.Replace(str,“data=”“*”、“data=”“”、“NEW VALUE”和“”)控制台。WriteLine(str2)它将用字符串“NEW VALUE”替换/download/test.pdf。。您可以将新值替换为您想要的任何值,例如/download/Test2.pdfHi Youssef非常感谢。我想在页面上显示,这样,它会工作吗?