i have an issue in login page created using asp.net(vb.net)when i host my page.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shanthiniramu
    New Member
    • Mar 2008
    • 2

    i have an issue in login page created using asp.net(vb.net)when i host my page.

    hi...

    I have an issue in my hosted page while i'm login

    when i give an invalid email-id in my login page, the page does'nt show any alert message......
    but i wrote coding to show that alert msg... it happens when i type those things at first time.

    but,.. during second time when i login to this same page, i can get that alert msg...

    for example..


    hosted website : (http://localhost/test/) showing login page.
    if i gave a invalid id, there is no error msg. the page is refreshed then the given userid and password textbox is cleared while the page is loading.

    then the url is changed to : (http://localhost/test/login.aspx).... again i gave an invalid id,
    Now,i can get that alert msg..

    i want to know, why this happens?

    and how can i get the alert msg while the page is loaded at the first time login...

    any can help me please... i'm in dead line.
  • nateraaaa
    Recognized Expert Contributor
    • May 2007
    • 664

    #2
    Do you have any code in the page_load method under

    Code:
     if(!IsPostBack) 
    {
    //do something
    }
    [font=Verdana][size=2][/size][/font]
    [font=Verdana][size=2]It sounds like it because the very first time the page loads you are not getting the desired result. If your message is inside this conditional statement try moving the code outside of this conditional statement.[/size][/font]
    [font=Verdana][size=2][/size][/font]
    [font=Verdana][size=2]Nathan[/size][/font]

    Comment

    • shanthiniramu
      New Member
      • Mar 2008
      • 2

      #3
      [QUOTE=nateraaaa]Do you have any code in the page_load method under

      [CODE] if(!IsPostBack)
      {
      //do something
      }
      It sounds like it because the very first time the page loads you are not getting the desired result. If your message is inside this conditional statement try moving the code outside of this conditional statement.
      -------------------------
      Thanks for your reply,

      I had a gridview functionality in the page load event,
      but not the button click functionality.
      To show the alert message, i have written code in the button_click event.

      Comment

      • kunal pawar
        Contributor
        • Oct 2007
        • 297

        #4
        I guess there is problem, u written code in button_click event.
        whats on first click it not shows message. and second time it shows message.

        did u register Alert script in button_click event

        can u show ur code on button_click event

        Comment

        Working...