如何在asp.net中给出优先顺序? [英] how to give the priority order in asp.net?

查看:61
本文介绍了如何在asp.net中给出优先顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在我的应用程序中有一个母版页,其中有两个文本框和一个按钮控件..当我在文本框中输入数据时,在系​​统中按Enter键,然后调用按钮控件,k很好...

但是我的问题是在一个子页面中我也具有与上面相同的控件,当我在文本框中输入数据并按Enter键时它将调用母版页面按钮控件,而不是子页面按钮控件...我想调用子页面按钮...如何帮助我

预先thnx

解决方案

用asp Panel包裹该页面上的控件,并将DefaultButton值设置为按钮的名称:

< asp:panel id = "  runat = "  defaultbutton = "  Button1" </  asp:panel  >  


hi
in my application have master page in that there is two textboxes and one button control..when i enter the data in textboxes end press enter button in my system then it calling button control,k fine...

but my problem is in one child page also i have the same controls of above,when i enter the data in textboxes and press enter button it will calling master page button control,not the child page button control...i want to call the child page button...how help me

thnx in advance

解决方案

Wrap the controls on that page with an asp Panel and set the DefaultButton value to the name of the button:

<asp:panel id="Panel1" runat="server" defaultbutton="Button1">
</asp:panel>


这篇关于如何在asp.net中给出优先顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆