开发者

ASP Button (Command vs Submit)

开发者 https://www.devze.com 2022-12-14 06:21 出处:网络
I want this to be a command button not a submit button, so that when the user pressesthe \"Submit\" button is \"clicked\".

I want this to be a command button not a submit button, so that when the user presses the "Submit" button is "clicked".

ASP Code:
<asp:Button CommandName="StartButtonName" CommandArgument="soo"
     CausesValidation="false" ID="StartButton" Text="..."
     Visible="false" runat="s开发者_运维百科erver" OnClick="StartButton_Click" />

Generated HTML code
<input type="submit" name="ctl00$ContentPlaceHolder1$StartButton"
       value="..." id="ctl00_ContentPlaceHolder1_StartButton" />

Why does my ASP Code not generate a command button?


Set UseSubmitBehavior to false. See the MSDN page for more info.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号