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. Onclick Event

Onclick Event

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasesysadminhelptutorial
4 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.
  • P Offline
    P Offline
    Paulraj G
    wrote on last edited by
    #1

    Hi... I am newbie to asp. my code is,

    <asp:Button ID="LOGIN" Text="Submit" Height = "25px" Width = "78px"
    runat="server" onclick="LOGIN_Click" ></asp:Button>
    <br />

            <%if (Login\_Result == "1")
              {
                  
              }
              else
              {
                  Response.Write(Login\_Result);
              } %>
            </p>
    

    when i click login button it will check in the database by c# code. if its true means Login_Result will return "1". Otherwise it will return "0". if Login_Result is "1", I have call call a new form main.aspx. How to do this? Help me...

    G.Paulraj

    R L 2 Replies Last reply
    0
    • P Paulraj G

      Hi... I am newbie to asp. my code is,

      <asp:Button ID="LOGIN" Text="Submit" Height = "25px" Width = "78px"
      runat="server" onclick="LOGIN_Click" ></asp:Button>
      <br />

              <%if (Login\_Result == "1")
                {
                    
                }
                else
                {
                    Response.Write(Login\_Result);
                } %>
              </p>
      

      when i click login button it will check in the database by c# code. if its true means Login_Result will return "1". Otherwise it will return "0". if Login_Result is "1", I have call call a new form main.aspx. How to do this? Help me...

      G.Paulraj

      R Offline
      R Offline
      R Giskard Reventlov
      wrote on last edited by
      #2

      Response.Redirect("main.aspx");

      is one way: there are others.

      Tychotics: take us back to the moon "Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars." H. G. Wells

      1 Reply Last reply
      0
      • P Paulraj G

        Hi... I am newbie to asp. my code is,

        <asp:Button ID="LOGIN" Text="Submit" Height = "25px" Width = "78px"
        runat="server" onclick="LOGIN_Click" ></asp:Button>
        <br />

                <%if (Login\_Result == "1")
                  {
                      
                  }
                  else
                  {
                      Response.Write(Login\_Result);
                  } %>
                </p>
        

        when i click login button it will check in the database by c# code. if its true means Login_Result will return "1". Otherwise it will return "0". if Login_Result is "1", I have call call a new form main.aspx. How to do this? Help me...

        G.Paulraj

        L Offline
        L Offline
        Lokesh Zende
        wrote on last edited by
        #3

        what about code behind? Is it in c# or vb? If its c# , then why don't you write your code on the on click event? :-D

        N 1 Reply Last reply
        0
        • L Lokesh Zende

          what about code behind? Is it in c# or vb? If its c# , then why don't you write your code on the on click event? :-D

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          You should check the original post

          Paulraj G wrote:

          it will check in the database by c# code.

          LokeshZende wrote:

          If its c# , then why don't you write your code on the on click event?

          So you can't use code-behind with VB.NET? You have done nothing to answer the OPs question.


          I know the language. I've read a book. - _Madmatt

          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