Click here to Skip to main content
15,886,055 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to use jcrop while uploading image Pin
Member 125514181-Jun-16 3:40
Member 125514181-Jun-16 3:40 
GeneralRe: how to use jcrop while uploading image Pin
Pete O'Hanlon1-Jun-16 5:31
mvePete O'Hanlon1-Jun-16 5:31 
GeneralRe: how to use jcrop while uploading image Pin
Member 125514181-Jun-16 20:35
Member 125514181-Jun-16 20:35 
GeneralRe: how to use jcrop while uploading image Pin
Pete O'Hanlon1-Jun-16 22:00
mvePete O'Hanlon1-Jun-16 22:00 
GeneralRe: how to use jcrop while uploading image Pin
Richard Deeming2-Jun-16 2:06
mveRichard Deeming2-Jun-16 2:06 
GeneralRe: how to use jcrop while uploading image Pin
Member 125514182-Jun-16 2:14
Member 125514182-Jun-16 2:14 
GeneralRe: how to use jcrop while uploading image Pin
Richard MacCutchan31-May-16 21:24
mveRichard MacCutchan31-May-16 21:24 
Questionc# string.IsNullOrEmpty Pin
aspkiddy31-May-16 6:59
aspkiddy31-May-16 6:59 
here is my table sql :

user----------term
John..........diligent
Jane..........new

I have a variable : termUser

and I find easily its value by Sql request when the user is saved it in the mysql table and this user see his term on the screen by (due to) the variable : termUser.
I try it by 2 way ( by if condition) and those way are correct results
C#
/* ......... Sql request ... */

string termUser = String.Empty;
string catchTerm = String.Empty;

while (dataMySqlReader.Read())
{
    catchTerm = (string)dataMySqlReader["user"];  

        // here is 1st way : 
        if (catchTerm != null)
        {
            termUser = (string)dataMySqlReader["term"];
        }
        else
        {
            termUser = "callow";

        }

        // et voici 2e version aussi marche 

        if (String.IsNullOrEmpty(catchTerm))
        {
            termUser = "callow";
        }
        else
        {
            termUser = (string)dataMySqlReader["term"];

        }

}

If the user is not in the mysql table, I think that SQL return 'NULL', so in this case, I want to affect this variable (termUser) by 'callow' : It's only for to display on his monitor.
But my code can not affect my variable.

I changed also my condition but I have not success by this :
C#
     if (String.IsNullOrEmpty(catchTerm))
         //...

<pre>
    if (string.IsNullOrEmpty(catchTerm) == true)
    //...
    </pre>

how I can affect my variable termUser by 'callow when the user is not in my table ?

Thanks
AnswerRe: c# string.IsNullOrEmpty Pin
Eddy Vluggen31-May-16 19:40
professionalEddy Vluggen31-May-16 19:40 
GeneralRe: c# string.IsNullOrEmpty Pin
Bernhard Hiller31-May-16 23:55
Bernhard Hiller31-May-16 23:55 
GeneralRe: c# string.IsNullOrEmpty Pin
Eddy Vluggen1-Jun-16 0:04
professionalEddy Vluggen1-Jun-16 0:04 
GeneralRe: c# string.IsNullOrEmpty Pin
V.1-Jun-16 1:19
professionalV.1-Jun-16 1:19 
GeneralRe: c# string.IsNullOrEmpty Pin
Bernhard Hiller1-Jun-16 4:07
Bernhard Hiller1-Jun-16 4:07 
AnswerRe: c# string.IsNullOrEmpty Pin
V.31-May-16 20:09
professionalV.31-May-16 20:09 
GeneralRe: c# string.IsNullOrEmpty Pin
Richard Deeming1-Jun-16 1:30
mveRichard Deeming1-Jun-16 1:30 
GeneralRe: c# string.IsNullOrEmpty Pin
V.1-Jun-16 1:32
professionalV.1-Jun-16 1:32 
GeneralRe: c# string.IsNullOrEmpty Pin
aspkiddy1-Jun-16 2:50
aspkiddy1-Jun-16 2:50 
QuestionRe: c# string.IsNullOrEmpty Pin
Eddy Vluggen1-Jun-16 2:52
professionalEddy Vluggen1-Jun-16 2:52 
AnswerRe: c# string.IsNullOrEmpty Pin
aspkiddy1-Jun-16 3:05
aspkiddy1-Jun-16 3:05 
GeneralRe: c# string.IsNullOrEmpty Pin
Eddy Vluggen1-Jun-16 5:00
professionalEddy Vluggen1-Jun-16 5:00 
GeneralRe: c# string.IsNullOrEmpty Pin
V.1-Jun-16 2:52
professionalV.1-Jun-16 2:52 
AnswerRe: c# string.IsNullOrEmpty Pin
aspkiddy1-Jun-16 2:56
aspkiddy1-Jun-16 2:56 
GeneralRe: c# string.IsNullOrEmpty Pin
V.1-Jun-16 3:00
professionalV.1-Jun-16 3:00 
AnswerRe: c# string.IsNullOrEmpty Pin
aspkiddy1-Jun-16 3:08
aspkiddy1-Jun-16 3:08 
GeneralRe: c# string.IsNullOrEmpty Pin
Matt T Heffron1-Jun-16 9:25
professionalMatt T Heffron1-Jun-16 9:25 

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.