Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/284.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/34.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# 服务器标记的格式不正确。asp.net LinkButton_C#_Asp.net - Fatal编程技术网

C# 服务器标记的格式不正确。asp.net LinkButton

C# 服务器标记的格式不正确。asp.net LinkButton,c#,asp.net,C#,Asp.net,Linkbutton出现此错误。在正常工作前几天,它突然出现错误 <asp:TemplateField HeaderText="College Name"> <ItemTemplate> <asp:LinkButton ID="lbSelectCollege" OnClientClick="MyLstCollege('<%#Eval("Name")%>'); return false;" ForeColor="Black" runat="server"

Linkbutton出现此错误。在正常工作前几天,它突然出现错误

<asp:TemplateField HeaderText="College Name">
<ItemTemplate>
<asp:LinkButton ID="lbSelectCollege" OnClientClick="MyLstCollege('<%#Eval("Name")%>');
return false;" ForeColor="Black" runat="server" TabIndex="-1">
<a style="cursor:pointer"><%#Eval("Name")%></a>
</asp:LinkButton>
</ItemTemplate>

您需要重新排列
OnClientClick中的单引号和双引号

改变

OnClientClick=“MyLstCollege(”);返回false

OnClientClick=”;返回false;'

您需要重新排列
OnClientClick中的单引号和双引号

改变

OnClientClick=“MyLstCollege(”);返回false

OnClientClick=”;返回false;'

解决了用此按钮替换linkbutton的问题

<a style="text-decoration: none; color: Black; cursor: pointer;" title="Select"   onclick="MyLstStatus('<%#Eval("Name")%>')" tabindex="-1"> <%#Eval("Name")%></a> 

解决了用此按钮替换linkbutton的问题

<a style="text-decoration: none; color: Black; cursor: pointer;" title="Select"   onclick="MyLstStatus('<%#Eval("Name")%>')" tabindex="-1"> <%#Eval("Name")%></a> 


你到底想做什么?我正在尝试选择链接按钮上的值。如果你对我的问题感兴趣,我会自己解决问题。你到底想做什么?我正在尝试选择链接按钮上的值。如果你对我的问题感兴趣,我会自己解决问题。预处理器指令必须显示为第一个行检查我的更新答案上的非空白字符,在我删除的结尾处有一个额外的分号。解决了此问题,将linkbutton替换为:预处理器指令必须显示为行检查我的更新答案上的第一个非空白字符,最后我删除了一个输入错误的额外分号。解决了此问题,将linkbutton替换为:
<a style="text-decoration: none; color: Black; cursor: pointer;" title="Select"   onclick="MyLstStatus('<%#Eval("Name")%>')" tabindex="-1"> <%#Eval("Name")%></a>