Auto Post Back

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

    #1

    Auto Post Back

    I have a ListBox with AutoPostBack='T rue'. The corresponsing form is
    set as follows:

    <form runat='server' method='POST' action='results .asp'
    name='mbrlst_se arch' ID='search_form '>

    When javascript is enabled, I auto-post the form at the bottom of
    the .aspx page. It works fine.

    With javascript disabled, however, the action of the form, when the
    submit button is clicked, does not work. The form continues to post
    to the originating page. I need the page to post to the action
    attribute (as written) when Javascript is off. However, the form keeps
    posting back to itself.

    I thought maybe the AutoPostBack='T rue' setting was causing this,
    which wouldn't make sense since the problem occurs when javascript is
    disabled, but I thought if I reset this attribute in these instances,
    the form would post as written.

    Does anyone know what the problem is here?

    Thanks,

    Scott

  • Aidy

    #2
    Re: Auto Post Back

    Does anyone know what the problem is here?

    Auto post back needs javascript enabled to work.


    Comment

    • bruce barker

      #3
      Re: Auto Post Back

      when you put a runat=server on a form, it always renders the action as
      the rendering page (do a view source). asp.net counts on javascript to
      support cross posting to another page.

      -- bruce (sqlwork.com)


      scotty wrote:
      I have a ListBox with AutoPostBack='T rue'. The corresponsing form is
      set as follows:
      >
      <form runat='server' method='POST' action='results .asp'
      name='mbrlst_se arch' ID='search_form '>
      >
      When javascript is enabled, I auto-post the form at the bottom of
      the .aspx page. It works fine.
      >
      With javascript disabled, however, the action of the form, when the
      submit button is clicked, does not work. The form continues to post
      to the originating page. I need the page to post to the action
      attribute (as written) when Javascript is off. However, the form keeps
      posting back to itself.
      >
      I thought maybe the AutoPostBack='T rue' setting was causing this,
      which wouldn't make sense since the problem occurs when javascript is
      disabled, but I thought if I reset this attribute in these instances,
      the form would post as written.
      >
      Does anyone know what the problem is here?
      >
      Thanks,
      >
      Scott
      >

      Comment

      Working...