gpt4 book ai didi

c# - .net 生成 onclick

转载 作者:行者123 更新时间:2023-11-27 22:45:00 25 4
gpt4 key购买 nike

我正在做一个看起来像的表单 POST

<form action="http://ServerName/fse5/main/FormPost.aspx" id="frmLogin" method="post" target="_blank">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<%= CompleteRequest %>
<input type="submit" name="__exclude__Submit" value="Run Illustration Software Online" runat="server" />
</table>
</form>

但是,当我呈现这个 HTML 时,输入标签看起来像

<input onclick="if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(''); " name="ctl00$PlaceHolderMain$IllustrationSoftwareComponent$ctl00" type="submit" value="Run Illustration Software Online" />

为什么 ASP.net 会添加 onClick 和 name 属性?我该如何阻止它?

最佳答案

要停止它,不要通过添加 runat="server"使其成为用户控件;看起来你不想要它/不需要它。

关于c# - .net 生成 onclick,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8044477/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com