Postback problem - different .net-versions?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frankieboy

    Postback problem - different .net-versions?

    I believe I've got a postback problem on our site. The strange thing
    is that everything works fine on my developing version, but not on the
    production site. I'm wondering if there may be different
    ..net-frameworks running.

    What I can read from the _doPostBack the developer edition is testing
    for Microsoft in the _doPostBack-routine, while the production site
    version is testing for Netscape in the _doPostBack-routine.

    Some code exerpts to illustrate the problem:

    When I run the site on the developer edition this generates the
    following form-tag and __doPostBack-event:

    <form name="__aspnetF orm" method="post" action="[WHATEVER]"
    id="__aspnetFor m" enctype="multip art/form-data">

    <script language="javas cript" type="text/javascript">
    <!--
    function __doPostBack(ev entTarget, eventArgument) {
    var theform;
    if (window.navigat or.appName.toLo werCase().index Of("microsoft" )[color=blue]
    > -1) {[/color]
    theform = document.__aspn etForm;
    }
    else {
    theform = document.forms["__aspnetFo rm"];
    }
    theform.__EVENT TARGET.value = eventTarget.spl it("$").join(": ");
    theform.__EVENT ARGUMENT.value = eventArgument;
    theform.submit( );
    }
    // -->
    </script>


    However, on the production site the form and __doPostBack is slightly
    different:
    - another form name
    - _doPostBack is slightly different, now checking for Netscape in
    stead of MS

    <form name="defaultfr ameworkefaultFo rm" method="post"
    action="[WHATEVER]" id="defaultfram ework_DefaultFo rm"
    enctype="multip art/form-data">

    <script language="javas cript">
    <!--
    function __doPostBack(ev entTarget, eventArgument) {
    var theform;
    if (window.navigat or.appName.toLo werCase().index Of("netscape") >
    -1) {
    theform = document.forms["defaultframewo rkefaultForm"];
    }
    else {
    theform = document.defaul tframeworkefaul tForm;
    }
    theform.__EVENT TARGET.value = eventTarget.spl it("$").join(": ");
    theform.__EVENT ARGUMENT.value = eventArgument;
    theform.submit( );
    }
    // -->
    </script>


    Whenever I save the page to an static HTML-page, and replaces the
    form-tag and the __doPostBack from my local edition to the production
    site, things seems OK. So my question is:
    Where are these defined? How can I alter the code which is generated
    on the production site to match the code generated on the developer
    site.

    Check it out at http://www.ks-bedrift.no/templates/K....aspx?id=21419.
    The dropdown and search fields in main area of page won't run because
    of this error.

    When checking folders on server I find that there is a folder
    C:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322. I interpret this as the
    server is running version 1.1.4322 of .net, which actually is the same
    that seems to be running on the developer-machine. At least both
    machines have this folder. Is there another way of checking the exact
    ..net-version running?

    The developer machine is running Windows XP and Visual Studio.Net. The
    live-server is running Windows Server 2003 Standard Edition.

    Any good advice would be highly appreciated!
  • Frankieboy

    #2
    Re: Postback problem - different .net-versions?

    ..Net-framework service pack 1 did the trick.
    Case solved, never mind this posting.

    Frankieboy


    frank@langva.co m (Frankieboy) wrote in message news:<5cacca9a. 0506130428.1f4d 49de@posting.go ogle.com>...[color=blue]
    > I believe I've got a postback problem on our site. The strange thing
    > is that everything works fine on my developing version, but not on the
    > production site. I'm wondering if there may be different
    > .net-frameworks running.
    >
    > What I can read from the _doPostBack the developer edition is testing
    > for Microsoft in the _doPostBack-routine, while the production site
    > version is testing for Netscape in the _doPostBack-routine.
    >
    > Some code exerpts to illustrate the problem:
    >
    > When I run the site on the developer edition this generates the
    > following form-tag and __doPostBack-event:
    >
    > <form name="__aspnetF orm" method="post" action="[WHATEVER]"
    > id="__aspnetFor m" enctype="multip art/form-data">
    >
    > <script language="javas cript" type="text/javascript">
    > <!--
    > function __doPostBack(ev entTarget, eventArgument) {
    > var theform;
    > if (window.navigat or.appName.toLo werCase().index Of("microsoft" )[color=green]
    > > -1) {[/color]
    > theform = document.__aspn etForm;
    > }
    > else {
    > theform = document.forms["__aspnetFo rm"];
    > }
    > theform.__EVENT TARGET.value = eventTarget.spl it("$").join(": ");
    > theform.__EVENT ARGUMENT.value = eventArgument;
    > theform.submit( );
    > }
    > // -->
    > </script>
    >
    >
    > However, on the production site the form and __doPostBack is slightly
    > different:
    > - another form name
    > - _doPostBack is slightly different, now checking for Netscape in
    > stead of MS
    >
    > <form name="defaultfr ameworkefaultFo rm" method="post"
    > action="[WHATEVER]" id="defaultfram ework_DefaultFo rm"
    > enctype="multip art/form-data">
    >
    > <script language="javas cript">
    > <!--
    > function __doPostBack(ev entTarget, eventArgument) {
    > var theform;
    > if (window.navigat or.appName.toLo werCase().index Of("netscape") >
    > -1) {
    > theform = document.forms["defaultframewo rkefaultForm"];
    > }
    > else {
    > theform = document.defaul tframeworkefaul tForm;
    > }
    > theform.__EVENT TARGET.value = eventTarget.spl it("$").join(": ");
    > theform.__EVENT ARGUMENT.value = eventArgument;
    > theform.submit( );
    > }
    > // -->
    > </script>
    >
    >
    > Whenever I save the page to an static HTML-page, and replaces the
    > form-tag and the __doPostBack from my local edition to the production
    > site, things seems OK. So my question is:
    > Where are these defined? How can I alter the code which is generated
    > on the production site to match the code generated on the developer
    > site.
    >
    > Check it out at http://www.ks-bedrift.no/templates/K....aspx?id=21419.
    > The dropdown and search fields in main area of page won't run because
    > of this error.
    >
    > When checking folders on server I find that there is a folder
    > C:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322. I interpret this as the
    > server is running version 1.1.4322 of .net, which actually is the same
    > that seems to be running on the developer-machine. At least both
    > machines have this folder. Is there another way of checking the exact
    > .net-version running?
    >
    > The developer machine is running Windows XP and Visual Studio.Net. The
    > live-server is running Windows Server 2003 Standard Edition.
    >
    > Any good advice would be highly appreciated![/color]

    Comment

    Working...