如何使默认的焦点内容页从母版页 [英] How to make the Default focus in content page from master page

查看:144
本文介绍了如何使默认的焦点内容页从母版页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的母版与内容占位符。我有contentpage这是使用母版页。在我所有的内容页,我需要默认焦点文本框,使用户可以文本框中直接键入而不是移动鼠标到文本框中。在某些页面没有文本框,这样我donnot NNET保持默认的焦点那边

I have masterpage with content place holder. i have contentpage which is using master page . in all my content page i need to default focus on the text box so that the user can directly type in text box instead moving the mouse over the textbox. in some page there is no text box so that i donnot nnet keep default focus over there

有什么办法,我可以在我的母版页做一次,可以重复使用,在我所有的内容页

Is there any way i can do it in my master page once and can reuse that in all my content page

谢谢

推荐答案

请尝试使用此...

((TextBox)Master.FindControl("txtRequiredFocus")).Focus();

这篇关于如何使默认的焦点内容页从母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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