Click here to Skip to main content
16,015,072 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Grid View Problems Pin
kubben2-May-07 2:58
kubben2-May-07 2:58 
GeneralRe: Grid View Problems [modified] Pin
Bajrang Singh2-May-07 4:33
Bajrang Singh2-May-07 4:33 
GeneralRe: Grid View Problems Pin
Chetan Ranpariya2-May-07 20:43
Chetan Ranpariya2-May-07 20:43 
Questionwinform login control Pin
daviperke2-May-07 2:39
daviperke2-May-07 2:39 
AnswerRe: winform login control Pin
Blumen2-May-07 3:05
Blumen2-May-07 3:05 
GeneralRe: winform login control Pin
daviperke2-May-07 3:10
daviperke2-May-07 3:10 
AnswerRe: winform login control Pin
Tarakeshwar Reddy2-May-07 3:39
professionalTarakeshwar Reddy2-May-07 3:39 
GeneralRe: winform login control Pin
daviperke2-May-07 3:46
daviperke2-May-07 3:46 
well, i want to use this code in my windows application, and it has nothing do to with the ASP.NET website anymore:

<br />
    protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)<br />
    {<br />
        bool Authenticated = false;<br />
        Authenticated = SiteLevelCustomAuthenticationMethod(Login1.UserName, Login1.Password);<br />
        e.Authenticated = Authenticated;<br />
        if (Authenticated == true)<br />
        {<br />
            Response.Redirect("Overzicht.aspx");<br />
        }<br />
    }<br />


    <br />
private bool SiteLevelCustomAuthenticationMethod(string UserName, string Password)<br />
    {<br />
        bool boolReturnValue = false;<br />
<br />
        string strConnection = "server=blabla;database=db;Integrated Security=SSPI;";<br />
        SqlConnection Connection = new SqlConnection(strConnection);<br />
        String strSQL = "Select * From tblPersoneelslid";<br />
        SqlCommand command = new SqlCommand(strSQL, Connection);<br />
        SqlDataReader Dr;<br />
        Connection.Open();<br />
        Dr = command.ExecuteReader();<br />
        while (Dr.Read())<br />
        {<br />
            if ((UserName == Dr["emailadres"].ToString()) & (Password == Dr["paswoord"].ToString()))<br />
            {<br />
                boolReturnValue = true;<br />
            }<br />
            Dr.Close();<br />
<br />
            return boolReturnValue;<br />
        }<br />
        return false;<br />
    }<br />


so when a user logged in correctly, he has to go to the page "frmMain.cs".

So the only think i ask is to help me a bit with "converting" the asp.net code into code i can use in my windows application.
GeneralRe: winform login control Pin
Tarakeshwar Reddy2-May-07 4:15
professionalTarakeshwar Reddy2-May-07 4:15 
AnswerRe: winform login control Pin
Tarakeshwar Reddy2-May-07 4:24
professionalTarakeshwar Reddy2-May-07 4:24 
QuestionPaging in a grid view troubles Pin
Senseicads2-May-07 2:27
Senseicads2-May-07 2:27 
AnswerRe: Paging in a grid view troubles Pin
kubben2-May-07 2:56
kubben2-May-07 2:56 
GeneralRe: Paging in a grid view troubles Pin
Senseicads2-May-07 3:18
Senseicads2-May-07 3:18 
QuestionAccess denied...... Pin
NetBot2-May-07 2:19
NetBot2-May-07 2:19 
AnswerRe: Access denied...... Pin
Christian Graus2-May-07 2:34
protectorChristian Graus2-May-07 2:34 
GeneralRe: Access denied...... Pin
NetBot2-May-07 2:54
NetBot2-May-07 2:54 
GeneralRe: Access denied...... Pin
Christian Graus2-May-07 10:29
protectorChristian Graus2-May-07 10:29 
QuestionGridview checkbox problems Pin
pauliehaha2-May-07 1:21
pauliehaha2-May-07 1:21 
AnswerRe: Gridview checkbox problems Pin
Senseicads2-May-07 2:37
Senseicads2-May-07 2:37 
GeneralRe: Gridview checkbox problems Pin
pauliehaha2-May-07 3:22
pauliehaha2-May-07 3:22 
AnswerRe: Gridview checkbox problems Pin
RSArockiam2-May-07 3:17
RSArockiam2-May-07 3:17 
GeneralRe: Gridview checkbox problems Pin
pauliehaha2-May-07 3:27
pauliehaha2-May-07 3:27 
Questionhow to show cursor on selected row of a grid in postback [modified] Pin
Sachin M Narangale2-May-07 1:10
Sachin M Narangale2-May-07 1:10 
AnswerRe: how to show cursor on selected row of a grid in postback Pin
N a v a n e e t h2-May-07 3:32
N a v a n e e t h2-May-07 3:32 
QuestionSession value is Reset in IE 7 Pin
Blumen2-May-07 0:23
Blumen2-May-07 0:23 

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.