3

I am using .net 4.0 . Please see this following code

 <asp:DropDownList ID="ddlCountry" runat="server" CssClass="input-xlarge" OnSelectedIndexChanged="CountrySelection_Changed" AutoPostBack="true" ></asp:DropDownList> 

Any type of post back not working like as click on button or linkbutton on production server.

This working fine all browser in production & local server except IE 11. How can solve this? Thanks in Advance!!

Letoncse
  • 702
  • 4
  • 15
  • 36

3 Answers3

2

To make it work properly, you need to make you application IE11 compatible by adding a file "ie.browser" in App_Browser folder... Check Out here

Vignesh Kumar A
  • 27,863
  • 13
  • 63
  • 115
1

Check

There are two ways to fix this: one is a machine-wide fix, the other is a way to fix individual sites.

Nikhil D
  • 2,479
  • 3
  • 21
  • 41
-1
//add this in html head section
<script type="text/javascript">

//<![CDATA[
    if ($('#__EVENTTARGET').length <= 0 && $('#__EVENTARGUMENT').length <= 0) {
        $('#aspnetForm').prepend('<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /><input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />');
    }
    var theForm = document.forms['aspnetForm'];
    if (!theForm) {
        theForm = document.aspnetForm;
    }

    function __doPostBack(eventTarget, eventArgument) {
        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
            theForm.__EVENTTARGET.value = eventTarget;
            theForm.__EVENTARGUMENT.value = eventArgument;
            theForm.submit();
        }
    }

//]]>

</script>





<%--add this client side function onchange="__doPostBack(this,this);"  --%>
<asp:DropDownList id="DDL"  Runat="server" AutoPostBack="true" OnSelectedIndexChanged="BindCategoryData"  onchange="__doPostBack(this,this);"></asp:DropDownList>
DanielV
  • 2,076
  • 2
  • 40
  • 61