Google

Friday, August 26, 2011

C# - DetailsView - Enable Inserting is missing

Go to configure data source, click advanced and then generate Insert Update Delete

Wednesday, August 24, 2011

C# Looping through listview items

' get value from the control   

    protected void Button1_Click(object sender, EventArgs e)
        {
            int x;
            string s;
            TextBox tb;
            for (x = 0; x < ListView1.Items.Count - 1; x++)
            {
                tb = (TextBox)ListView1.Items[x].FindControl("TextBox1");
                s = tb.Text.ToString();
            }
        }

Thursday, August 18, 2011

catch exception show line number

catch exception show line number
ex.StackTrace
Catch ex As Exception
            Dim strError As String = ex.StackTrace
End Try