Click here to Skip to main content
15,887,812 members
Home / Discussions / C#
   

C#

 
AnswerRe: Need help with GAC and Register updates from Custom Installer Pin
LongRange.Shooter21-Mar-06 10:32
LongRange.Shooter21-Mar-06 10:32 
Questionhow i can translate word from english to arabic and vise verse using word object in c# Pin
Ortiga21-Mar-06 6:05
Ortiga21-Mar-06 6:05 
AnswerRe: how i can translate word from english to arabic and vise verse using word object in c# Pin
LongRange.Shooter21-Mar-06 7:24
LongRange.Shooter21-Mar-06 7:24 
QuestionProtect Media Files Pin
Kostas Dak21-Mar-06 5:45
Kostas Dak21-Mar-06 5:45 
AnswerRe: Protect Media Files Pin
Ahmad Mahmoud [candseeme]21-Mar-06 22:38
Ahmad Mahmoud [candseeme]21-Mar-06 22:38 
Question"Reactivating" Form Pin
MarcoNedwig21-Mar-06 5:45
MarcoNedwig21-Mar-06 5:45 
QuestionSelection problem with Custom Control for CF Pin
rnvrnv21-Mar-06 5:42
rnvrnv21-Mar-06 5:42 
Questionplease help me, i cant find the way out Pin
yamacom21-Mar-06 5:30
yamacom21-Mar-06 5:30 
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace Personal_WebPage
{
///
/// Summary description for WebForm1.
///

public class Login : System.Web.UI.Page
{
protected System.Web.UI.HtmlControls.HtmlTable tblContent;
protected System.Web.UI.WebControls.Label lblUser;
protected System.Web.UI.WebControls.Label lblPass;
protected System.Web.UI.WebControls.TextBox txtUser;
protected System.Web.UI.WebControls.TextBox txtPass;
protected System.Web.UI.WebControls.Label lblError;
protected System.Web.UI.WebControls.Button btnLogin;
protected System.Web.UI.HtmlControls.HtmlTable tblHeaderMF;
protected System.Web.UI.HtmlControls.HtmlTable tblMenuMF;
protected System.Web.UI.HtmlControls.HtmlTable tblFooterMF;
protected System.Web.UI.HtmlControls.HtmlTable tblFrame;

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void btnLogin_Click(object sender, System.EventArgs e)
{
string ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0 " +
";Data Source= C:\\Inetpub\\wwwroot\\Personal_WebPage\\Database.mdb";
Search(ConnectionString);
}

private void Search(string ConnectionString)
{
string SQLcmd;
string strUser, strPass;
bool Check=false;

OleDbConnection conn = new OleDbConnection(ConnectionString);
conn.Open();

strUser = txtUser.Text;
strPass = txtPass.Text;
SQLcmd = string.Format("select UserName,PassWord from tblAccount where UserName = {0} and PassWord = {1}",strUser,strPass);
OleDbCommand cmd = new OleDbCommand(SQLcmd,conn);

OleDbDataReader objReader;
objReader = cmd.ExecuteReader();

while (objReader.Read())
{
if ((objReader.GetString(0) != "") && (objReader.GetString(1) != ""))
Check = true;
}
if (Check==true)
Response.Redirect("MainFrame.aspx");
else
{
lblError.Visible=true;
Response.Redirect("Login.aspx");
}

objReader.Close();
conn.Close();
}
}
}
AnswerRe: please help me, i cant find the way out Pin
J4amieC21-Mar-06 5:43
J4amieC21-Mar-06 5:43 
AnswerRe: please help me, i cant find the way out Pin
Anil C21-Mar-06 7:08
Anil C21-Mar-06 7:08 
AnswerRe: please help me, i cant find the way out Pin
Luis Alonso Ramos21-Mar-06 17:36
Luis Alonso Ramos21-Mar-06 17:36 
GeneralRe: please help me, i cant find the way out Pin
yamacom21-Mar-06 20:21
yamacom21-Mar-06 20:21 
GeneralRe: please help me, i cant find the way out Pin
Luis Alonso Ramos22-Mar-06 6:29
Luis Alonso Ramos22-Mar-06 6:29 
QuestionFile in use? Pin
Harish Krishnan21-Mar-06 5:15
Harish Krishnan21-Mar-06 5:15 
AnswerRe: File in use? Pin
tarasn21-Mar-06 22:36
tarasn21-Mar-06 22:36 
QuestionHow to paint a rotate rectangle in form? Pin
summercoal21-Mar-06 4:33
summercoal21-Mar-06 4:33 
Questioninterop programming Pin
V.21-Mar-06 3:58
professionalV.21-Mar-06 3:58 
AnswerRe: interop programming Pin
leppie21-Mar-06 7:00
leppie21-Mar-06 7:00 
GeneralRe: interop programming Pin
V.21-Mar-06 20:15
professionalV.21-Mar-06 20:15 
AnswerRe: interop programming Pin
Judah Gabriel Himango21-Mar-06 8:23
sponsorJudah Gabriel Himango21-Mar-06 8:23 
GeneralRe: interop programming Pin
V.21-Mar-06 20:16
professionalV.21-Mar-06 20:16 
QuestionADO.NET Encrypted data Pin
gmhanna21-Mar-06 3:28
gmhanna21-Mar-06 3:28 
QuestionRegex question - how to match crc checksum Pin
daniilzol21-Mar-06 3:26
daniilzol21-Mar-06 3:26 
QuestionUpdating DataTable Pin
zaboboa21-Mar-06 3:07
zaboboa21-Mar-06 3:07 
Questionprivate chat web-application in c# using socket programming Pin
shabeer.ak21-Mar-06 2:15
shabeer.ak21-Mar-06 2:15 

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.