Null

How can i pass the Null value from the c# code to the StroredProcedure?.
Rahamathulla_JAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
SystemExpertConnect With a Mentor Commented:
Hi,

if (hshSearchCriteria[UserID] != null)
{
      string UserID = hshSearchCriteria[UserID].ToString();
      dbCommandWrapper.AddInParameter("UserID",DbType.String, UserID);

}
else
{
      dbCommandWrapper.AddInParameter("UserID",DbType.String, DBNull.Value);
}

Thanks
0
 
Carl TawnSystems and Integration DeveloperCommented:
DbNull.Value;
0
All Courses

From novice to tech pro — start learning today.