如何使默认的焦点内容页从母版页焦点、内容、母版

由网友(劝君莫执意)分享简介:我的母版与内容占位符。我有contentpage这是使用母版页。在我所有的内容页,我需要默认焦点文本框,使用户可以文本框中直接键入而不是移动鼠标到文本框中。在某些页面没有文本框,这样我donnot NNET保持默认的焦点那边I have masterpage with content place hold...

我的母版与内容占位符。我有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();
阅读全文

相关推荐

最新文章