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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Clear the textboxes in logincontrol if login fails.

Clear the textboxes in logincontrol if login fails.

Scheduled Pinned Locked Moved ASP.NET
8 Posts 4 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.
  • S Offline
    S Offline
    SreejithAchutan
    wrote on last edited by
    #1

    Hi Friends, I put a logincontrol in a page to login using Membership.If no such user exists then i write code in login_error event to show a message box that no such user.I want to clear the 2 textboxes if no such users exists.How i clear the textboxes for entering username and password in logincontrol if login fails.

    S 1 Reply Last reply
    0
    • S SreejithAchutan

      Hi Friends, I put a logincontrol in a page to login using Membership.If no such user exists then i write code in login_error event to show a message box that no such user.I want to clear the 2 textboxes if no such users exists.How i clear the textboxes for entering username and password in logincontrol if login fails.

      S Offline
      S Offline
      Shrinivas Singh
      wrote on last edited by
      #2

      Hi, You can try textbox1.text="" or textbox1.text=String.Empty

      S 1 Reply Last reply
      0
      • S Shrinivas Singh

        Hi, You can try textbox1.text="" or textbox1.text=String.Empty

        S Offline
        S Offline
        SreejithAchutan
        wrote on last edited by
        #3

        I tried this also.but i the textbox wont be cleared.I used alert box to show no such user message.How i solve the textbox after displays the alert box.

        S 1 Reply Last reply
        0
        • S SreejithAchutan

          I tried this also.but i the textbox wont be cleared.I used alert box to show no such user message.How i solve the textbox after displays the alert box.

          S Offline
          S Offline
          Shrinivas Singh
          wrote on last edited by
          #4

          hi, alert will be run at client side.But u r checking for user at server side.have u written the given code at server side?have u tried to debug the same?what value it shows for textbox1.text=""

          S 1 Reply Last reply
          0
          • S Shrinivas Singh

            hi, alert will be run at client side.But u r checking for user at server side.have u written the given code at server side?have u tried to debug the same?what value it shows for textbox1.text=""

            S Offline
            S Offline
            SreejithAchutan
            wrote on last edited by
            #5

            Alert also will be applied in serverside.

            Y 1 Reply Last reply
            0
            • S SreejithAchutan

              Alert also will be applied in serverside.

              Y Offline
              Y Offline
              Yusuf
              wrote on last edited by
              #6

              SreejithAchutan wrote:

              Alert also will be applied in serverside. Quote Selected Text

              huh? can you explain what you meant by that? How is Alert in Server side tied to client side?

              Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

              V 1 Reply Last reply
              0
              • Y Yusuf

                SreejithAchutan wrote:

                Alert also will be applied in serverside. Quote Selected Text

                huh? can you explain what you meant by that? How is Alert in Server side tied to client side?

                Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

                V Offline
                V Offline
                vinodkrebc
                wrote on last edited by
                #7

                Ok Yusuf, you can add client side code on server side and that will be execute on client side if you don't know then let me know thank You Vinod Software Engineer EBC Publishing Ltd Lucknow(India)

                Y 1 Reply Last reply
                0
                • V vinodkrebc

                  Ok Yusuf, you can add client side code on server side and that will be execute on client side if you don't know then let me know thank You Vinod Software Engineer EBC Publishing Ltd Lucknow(India)

                  Y Offline
                  Y Offline
                  Yusuf
                  wrote on last edited by
                  #8

                  You can use ClientScriptManager[^] to add client scripts.

                  Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

                  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