Click here to Skip to main content
15,888,521 members
Home / Discussions / C#
   

C#

 
AnswerRe: Insert Duplicate into Hashset Pin
Montasser Ben Ouhida5-Mar-12 3:32
Montasser Ben Ouhida5-Mar-12 3:32 
Questioncombobox filter in datagridview filterpoup Pin
polachan5-Mar-12 0:56
polachan5-Mar-12 0:56 
Questionrunning multiple dos commands (including TFS commands) in c# Pin
canakcan4-Mar-12 22:40
canakcan4-Mar-12 22:40 
AnswerRe: running multiple dos commands (including TFS commands) in c# Pin
Richard MacCutchan4-Mar-12 23:33
mveRichard MacCutchan4-Mar-12 23:33 
AnswerRe: running multiple dos commands (including TFS commands) in c# Pin
BobJanova5-Mar-12 0:20
BobJanova5-Mar-12 0:20 
QuestionInserting the XML tag in existing file Pin
Harish Reddy K4-Mar-12 20:22
Harish Reddy K4-Mar-12 20:22 
AnswerRe: Inserting the XML tag in existing file Pin
Wayne Gaylard4-Mar-12 21:01
professionalWayne Gaylard4-Mar-12 21:01 
QuestionHI ANYBODY PLS HELP ME ! Pin
mbjino4-Mar-12 19:11
mbjino4-Mar-12 19:11 
HI THIS IS MY C# PROGRAM I WANT TO GET A BOOLEAN RESULT TRUE OF FALSE I DIDNT FIND ANY ERROR....BUT THE PROB IS ONLY THE EXECPTION PART IS GETTING EXECUTED...ITS A LOGIN PAGE,....

C#
public bool validateuser(User u)
    {
        bool result = true;
        try
        {
            string validateq = "select count(*) from register where user.username = @username and user.password = @passwd ";
            cmd = new SqlCommand(validateq, con);
            cmd.Parameters.AddWithValue("@username", u.username);
            cmd.Parameters.AddWithValue("@passwd", u.password);
            con.Open();
            reader = cmd.ExecuteReader();
            reader.Read();
            int r = Convert.ToInt32(reader[0]);
            if (r > 0)
            {
                result = true;
            }
            else
            {
                result = false;
            }
            return result;

        }

        catch (Exception ex)
        {
              result = false;
            return result;
        }
    }

AnswerRe: HI ANYBODY PLS HELP ME ! Pin
Bernhard Hiller4-Mar-12 19:17
Bernhard Hiller4-Mar-12 19:17 
GeneralRe: HI ANYBODY PLS HELP ME ! Pin
mbjino4-Mar-12 19:22
mbjino4-Mar-12 19:22 
GeneralRe: HI ANYBODY PLS HELP ME ! Pin
Bernhard Hiller4-Mar-12 19:23
Bernhard Hiller4-Mar-12 19:23 
GeneralRe: HI ANYBODY PLS HELP ME ! Pin
mbjino4-Mar-12 19:25
mbjino4-Mar-12 19:25 
GeneralRe: HI ANYBODY PLS HELP ME ! Pin
Pete O'Hanlon4-Mar-12 19:33
mvePete O'Hanlon4-Mar-12 19:33 
GeneralRe: HI ANYBODY PLS HELP ME ! Pin
mbjino4-Mar-12 19:34
mbjino4-Mar-12 19:34 
GeneralRe: HI ANYBODY PLS HELP ME ! Pin
Pete O'Hanlon4-Mar-12 20:30
mvePete O'Hanlon4-Mar-12 20:30 
GeneralRe: HI ANYBODY PLS HELP ME ! Pin
Bernhard Hiller4-Mar-12 21:08
Bernhard Hiller4-Mar-12 21:08 
AnswerRe: HI ANYBODY PLS HELP ME ! Pin
Wayne Gaylard4-Mar-12 20:46
professionalWayne Gaylard4-Mar-12 20:46 
AnswerRe: HI ANYBODY PLS HELP ME ! PinPopular
OriginalGriff4-Mar-12 21:36
mveOriginalGriff4-Mar-12 21:36 
AnswerRe: HI ANYBODY PLS HELP ME ! Pin
Luc Pattyn5-Mar-12 2:07
sitebuilderLuc Pattyn5-Mar-12 2:07 
GeneralRe: HI ANYBODY PLS HELP ME ! Pin
jschell5-Mar-12 8:29
jschell5-Mar-12 8:29 
AnswerRe: HI ANYBODY PLS HELP ME ! Pin
Luc Pattyn5-Mar-12 8:48
sitebuilderLuc Pattyn5-Mar-12 8:48 
AnswerRe: HI ANYBODY PLS HELP ME ! Pin
Shameel5-Mar-12 2:22
professionalShameel5-Mar-12 2:22 
AnswerRe: HI ANYBODY PLS HELP ME ! Pin
PIEBALDconsult5-Mar-12 7:20
mvePIEBALDconsult5-Mar-12 7:20 
AnswerRe: HI ANYBODY PLS HELP ME ! Pin
jschell5-Mar-12 8:31
jschell5-Mar-12 8:31 
QuestionDisplay images in Gridview Pin
Elizabeth Rani4-Mar-12 18:43
Elizabeth Rani4-Mar-12 18:43 

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.