开发者

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

开发者 https://www.devze.com 2022-12-20 12:24 出处:网络
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 th

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

精彩评论

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

关注公众号