开发者

not able to focus to textbox after asp.net updatepanel postback

I am using asp.net update panel for part of the page. I have a textbox outside of the updatepanel. This textbox is used to search for employees. If the user does some action inside the update panel that causes a postback and after the page is rendered I cannot c开发者_开发技巧lick on the textbox to enter text. This happens in IE7. But in IE8 it works fine. I can enter the text in the textbox after the postback. Also, if I remove the update panel everything works fine in IE7 also. Did anyone experience this problem? Is there a workaround for this?


How are you posting back when the user does something within the update panel? I'd suggest doing a partial postback and not a full postback. This may help your problem.

<script type="text/javascript">
  function doPartialPostBack()
  {
     __doPostBack('<%=UpdatePanel.ClientID %>', '');
  }
</script>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜