如何在 ASP.NET 1.1 中创建输入按钮

发布于 2024-08-08 23:02:25 字数 246 浏览 7 评论 0原文

我正在尝试使用 ASP.Net 控件在 ASP.Net 中创建通用 按钮,但不幸的是,我现在只能使用 ASP.Net 1.1。我知道您可以在 ASP.Net 的更高版本中使用 UseSubmitBehavior="False" 属性,但我似乎找不到在 ASP.Net 1.1 中执行此操作的方法。有没有办法做到这一点,或者我只需要创建控件的 HTML 版本并将其设置为 runat="server"?

I'm trying to create a generic <input type="button"> button in ASP.Net using an ASP.Net control and I'm unfortunately stuck using ASP.Net 1.1 right now. I know you can use the UseSubmitBehavior="False" attribute in later versions of ASP.Net but I can't seem to find a way to do this in ASP.Net 1.1. Is there a way to do this or will I need to just create the HTML version of the control and set it to runat="server"?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

轻许诺言 2024-08-15 23:02:25

看来您无法使用 ASP.NET 控件来做到这一点。我能够完成这项工作的唯一方法是使用 控件。

Well it looks like you just can't do this with an asp.net control. The only way I was able to make this work was with an <input type="button" runat="server"> control.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文