Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Posting in asp.net

Posting in asp.net

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netsysadmin
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    matsnas
    wrote on last edited by
    #1

    Hi! I have a login control (LogIn.asmx) and a search control (Search.asmx). When typing in the search control and pressing return the whole page is posted to the server. My login control is looking for IsPost back but still it tries to log me in?! How should I do to prevent this behaviour? How can I make the page respond to the "correct" submitevent? Thnx!

    P V 2 Replies Last reply
    0
    • M matsnas

      Hi! I have a login control (LogIn.asmx) and a search control (Search.asmx). When typing in the search control and pressing return the whole page is posted to the server. My login control is looking for IsPost back but still it tries to log me in?! How should I do to prevent this behaviour? How can I make the page respond to the "correct" submitevent? Thnx!

      P Offline
      P Offline
      Pradipta Basu
      wrote on last edited by
      #2

      As far as I can understand, you have two usercontrols inside a server side form. so when you are pressing enter into search control, the postback fires and hence gives problem to your login control. The solution is that you keep the two controls in two different forms in the page. Since there can't be two server side forms, so one of your forms have to be an ordinary html form, and you have to deal with that usercontrol in the classic ASP style. Thanks

      Pradipta Basu

      1 Reply Last reply
      0
      • M matsnas

        Hi! I have a login control (LogIn.asmx) and a search control (Search.asmx). When typing in the search control and pressing return the whole page is posted to the server. My login control is looking for IsPost back but still it tries to log me in?! How should I do to prevent this behaviour? How can I make the page respond to the "correct" submitevent? Thnx!

        V Offline
        V Offline
        Venkatesh Mookkan
        wrote on last edited by
        #3

        The problem is, when you press Enter key from the Search control, its triggering Login Control's submit click... This is because Login Control has the Default Action Command. To solve this problem, use javascript in onkeycode event of each TextBox control in your UserControl and trigger the Submit action when Enter key is pressed.

        Regards, Venkatesh Mookkan. Software Engineer, India My: Website | Yahoo Group

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups