string Item = Convert.ToString(drr["Item_Code"]);
This Row is not present in the Datatable.So its throw an error.Instead of thrown an erroe i want the (Item ) value is NULL..
Is this Possible without using If Conditon
rhino000 says: string Item = Convert.ToString(drr["Item_Code"]);
string
Item = Convert.ToString(drr[
"Item_Code"
]);
replace above code with below
string Item = drr["Item_Code"] == null ? "NULL" : Convert.ToString(drr["Item_Code"]);
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.