开发者

Avoid setting focus in .net page

I have a .net page with following markup:

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" />
<asp:TextBox ID="TextBox2" runat="server" ></asp:TextBox>
<asp:Button ID="Button2" runat="server" />

When I view the开发者_Python百科 page in browser, I noticed that the first button has the focus. I want to avoid this, so I set focus on something else in code behind. Then secondly I noticed that when clicking in a textbox, the first button gets the focus again. I would like to avoid all the "focus setting" altogether, is there a way?


Have a look at this article

It is important to realize that this behavior is also dependent on the browser.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜