ASP DropDown causes ViewState to appear in the address bar

If you visit this page in Internet explorer and select a value from the Current Media Releases dropdown at the top right, eventually IE will try to redirect you to an ugly URL containing this line:

__ EventTarget = selArchives & __ EVENTARGUMENT = & __ LASTFOCUS = & __ VIEWSTATE =

The page should only update the string value of the selArchives string.

The dropdown AutoPostBack is set to true and the codebehind is in VB, here is the event handler:

Private Sub selArchives_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles selArchives.SelectedIndexChanged
    Response.Redirect("index.aspx?selArchives=" + selArchives.SelectedValue)
End Sub

      

Obviously I could just write JavaScript myself, but I would like to find the source of the problem.


Not sure what exactly caused the problem. It looks like it was a combination of several factors.

thanks for the help

+1


source to share


4 answers


First, there are JavaScript errors on your page. Please correct them.

Second, you only see the ugly url when you select a date and hit the go button. But you have a dropdown for auto postback. Turn the button; you don't need that.



There's something entrusted with a button in your codeb. And a dropdown menu as it stops working after multiple uses.

You will need to post the source of your page for more help.

0


source


I went to the site. Apart from the javascript errors that show up, it works fine.

== Error: $ is not defined Source file: http://www.maplesoft.com/ScriptResource.axd?d=kNY1h-WYJzKkuCdZqmndbpb67jRr2cZCC6s2tf_nrnwCcH6rvds1RZUYXUp0gdMqnu88x-oV33w40



Line: 1

+1


source


The problem only occurs in IE. It works great in Firefox and obviously in Chrome.

0


source


Works well for me and IE7 on XP2.

However, there is an expected error while loading the object. $ is undefined.

0


source







All Articles