开发者

AutoComplete does not save when there's a postback before Submit

I have a very simple asp.net form.

a text box, a dropdownlist with autopostback, a submit button

  1. now if i type in some value into the textbox
  2. and then select an item in the dropdown which causes a page postback.
  3. then click on submit button

the value in the text box does not get saved into the autocomplete data store.

if i do the opposite.

  1. select an item from the dropdown which will cause a page postback.
  2. type in some values in the textbox.
  3. click submit. the value is saved for the autocomplete.

I think this may have something to do with the page life cycle and the viewstate. but how do i get around this issue? I'm using 开发者_StackOverflow社区IE8.

I have tried the AutoCompleteSaveForm command. but it does not work if there's a postback immediately after the execution of it.


Use this for IE:

if($.browser.msie){window.external.AutoCompleteSaveForm(FormName)};

It does not work for Firefox and I'm trying to find the answer for that....

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜