Click here to Skip to main content
15,919,028 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Asp.Net Window Pop Up Pin
J Liang24-Apr-07 17:37
J Liang24-Apr-07 17:37 
GeneralRe: Asp.Net Window Pop Up Pin
J Liang24-Apr-07 17:43
J Liang24-Apr-07 17:43 
GeneralRe: Asp.Net Window Pop Up Pin
enjoycrack24-Apr-07 17:53
enjoycrack24-Apr-07 17:53 
GeneralRe: Asp.Net Window Pop Up Pin
J Liang24-Apr-07 18:35
J Liang24-Apr-07 18:35 
Questionmultiple scripts __doPostBack problem Pin
Russell Jones23-Apr-07 22:10
Russell Jones23-Apr-07 22:10 
QuestionLogin control [modified] Pin
daviperke23-Apr-07 21:57
daviperke23-Apr-07 21:57 
AnswerRe: Login control Pin
szukuro23-Apr-07 22:25
szukuro23-Apr-07 22:25 
GeneralRe: Login control Pin
daviperke23-Apr-07 22:57
daviperke23-Apr-07 22:57 
ty for the answer, but i have a new question now, i looked up for some new code and found this:
my login.aspx file:

<%@ Page Language="C#" %><br />
<%@ Import Namespace="System.Data" %><br />
<%@ Import Namespace="System.Data.OleDb" %><br />
<%@ Import Namespace="System.Web.Security" %><br />
<%@ Register TagPrefix="MySite" TagName="Login" Src="login.ascx" %><br />
<br />
<script language="C#" runat="server"><br />
private void Page_Load(Object sender, EventArgs E) <br />
{<br />
if ((Page.IsPostBack) && (Page.IsValid)) {<br />
   string strDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Membership.mdb";<br />
   string strSQL = "SELECT userName, userPassword FROM Membership WHERE userName='" + MyLogin.UserId + "'";<br />
<br />
   OleDbConnection myConn = new OleDbConnection(strDSN);<br />
   OleDbCommand myCmd = new OleDbCommand(strSQL, myConn);<br />
   OleDbDataReader dr = null;<br />
   try {<br />
    myConn.Open();<br />
    dr = myCmd.ExecuteReader();<br />
<br />
    if(dr.Read()) {<br />
        if(dr.GetString(1).Trim() == MyLogin.Password.Trim()) <br />
        {<br />
               FormsAuthentication.RedirectFromLoginPage(MyLogin.UserId, false);<br />
        }<br />
        else<br />
                   Message.Text = "Login mislukt. Probeer opnieuw";<br />
    }<br />
    else<br />
    {<br />
        Message.Text = "Login mislukt. Probeer opnieuw";<br />
    }<br />
   }<br />
   catch(Exception myException) {<br />
    Response.Write("Oops. The error: " + myException.Message);<br />
   }<br />
   finally {<br />
    myConn.Close();<br />
}<br />
}<br />
}<br />
</script><br />
<html><br />
<body><br />
<h3>Login</h3><br />
<form runat="server" ID="Form1"><br />
<asp:Label id="Message" runat="server" /><br />
<MySite:Login id="MyLogin" BackColor="#FFFFCC" runat="server"/><br />
</form><br />
</body><br />
</html>



Is it possible to work with a OleDbConnection to connect to a SQL database?

thanks in advance
GeneralRe: Login control Pin
szukuro23-Apr-07 23:18
szukuro23-Apr-07 23:18 
GeneralRe: Login control Pin
daviperke23-Apr-07 23:40
daviperke23-Apr-07 23:40 
GeneralRe: Login control Pin
szukuro24-Apr-07 1:04
szukuro24-Apr-07 1:04 
GeneralRe: Login control Pin
daviperke24-Apr-07 1:33
daviperke24-Apr-07 1:33 
GeneralRe: Login control Pin
szukuro24-Apr-07 3:35
szukuro24-Apr-07 3:35 
GeneralRe: Login control Pin
daviperke25-Apr-07 23:02
daviperke25-Apr-07 23:02 
GeneralRe: Login control Pin
szukuro26-Apr-07 1:28
szukuro26-Apr-07 1:28 
GeneralRe: Login control Pin
daviperke26-Apr-07 1:36
daviperke26-Apr-07 1:36 
GeneralRe: Login control Pin
szukuro26-Apr-07 2:31
szukuro26-Apr-07 2:31 
GeneralRe: Login control Pin
daviperke26-Apr-07 2:38
daviperke26-Apr-07 2:38 
Questionchat window Pin
saravanan0523-Apr-07 21:54
saravanan0523-Apr-07 21:54 
AnswerRe: chat window Pin
Shuaib wasif khan23-Apr-07 22:36
Shuaib wasif khan23-Apr-07 22:36 
AnswerRe: chat window Pin
enjoycrack23-Apr-07 23:45
enjoycrack23-Apr-07 23:45 
QuestionVideo streaming in asp.net web application Pin
gouravverma23-Apr-07 21:48
gouravverma23-Apr-07 21:48 
QuestionURGENT>>>>>>>ASP Logging!!! Pin
mabrar23-Apr-07 21:35
mabrar23-Apr-07 21:35 
AnswerRe: URGENT>>>>>>>ASP Logging!!! Pin
enjoycrack23-Apr-07 23:53
enjoycrack23-Apr-07 23:53 
QuestionProblem in data saving Pin
Care Career23-Apr-07 21:30
Care Career23-Apr-07 21:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.