1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

few question?

Discussion in 'ASP.NET' started by Swarnava, Oct 7, 2004.

  1. Swarnava

    Swarnava New Member

    hi All,
    Well I am an electronics and communication eng and working in a company as a trainee under software development, I have somewhat programmable knowledge on c and c++, Here I am learning ASP.NET with c# .
    Now as I am mot familiar to .NET or ASP i am facing a bit problem in vizualizing certain stuff, So any help will be highly appreciable,
    My question is:-
    Well I created a login page now i want to verify it with the database with those name and then if it exists wish to redirect to the welcome homepage, so what are the steps I should follow , Please information ono any field is highly appreciable.
    Maybe people who is familiar with vb.Net can tell me the basic algorithm they follow and i will try to implement that in asp.net.
    Thank you looking forward for your reply. Take care and happy programming :).

    sorry for posting in this section as by mistake instead of reading ALP I READ ASP , SORRY BUDDIES ;)
    Last edited: Oct 7, 2004
  2. shabbir

    shabbir Administrator Staff Member

    Create a form with the following code
     <form id="Form1" method="post" action="welcome.aspx">
       <input type="text" name="txt"> <input type="submit" value="send">
    Now on welcome.aspx file page load event put this code
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      Dim str As String
      str = Request.Item("txt")
      ' SQL to test User
      'If Valid User
        Label1.text = "welcome"
        Label1.text = "Not a Valid User"
    End Sub
    Now when you have the str from the previous page you can execute the sql you want with the database and check whether any user with that username exists and you can also have the password field in similar way and put an sql with your favorite database to verify the user then use different labels text to show match / mismatch.
  3. Swarnava

    Swarnava New Member

    Thanks thatreally help, great!!!! work, only minor changes decleration of variable, great work, thank you sir,
  4. shabbir

    shabbir Administrator Staff Member

    My pleasure

Share This Page