User Profile

Collapse

Profile Sidebar

Collapse
lad1412
lad1412
Last Activity: May 16 '12, 03:11 PM
Joined: May 16 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • lad1412
    replied to How to check and replace null value in C#
    I have already find out a way to solve this error. Thanks

    Code:
    private String ConvertNullToEmptyString(DataTable element)
        {
            if (element.Rows.Count > 0) //just add this condition here
            {
                if (!DBNull.Value.Equals(element.Rows[0]["FullName"]))
                    return (string)element.Rows[0]["FullName"] + " ";
                else
    ...
    See more | Go to post

    Leave a comment:


  • lad1412
    started a topic How to check and replace null value in C#

    How to check and replace null value in C#

    Code:
    private DataTable getSomething1(String text){
        DataTable dtb = new DataTable();
        ...
        ...
        return dtb;
    }
    
    ...
    
    protected void buttonCheck_Click(object sender, ImageClickEventArgs e){
        List<DataTable> dtList = new List<DataTable>(){
            getSomething(item1.Text),
            getSomething2(item2.Text),
            getSomething3(item3.Text),
    ...
    See more | Go to post
No activity results to display
Show More
Working...