Click here to Skip to main content
15,909,242 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Equivalent of VB6 Function? Pin
Richard MacCutchan16-Nov-18 3:15
mveRichard MacCutchan16-Nov-18 3:15 
AnswerRe: C# Equivalent of VB6 Function? Pin
Eddy Vluggen16-Nov-18 4:05
professionalEddy Vluggen16-Nov-18 4:05 
GeneralRe: C# Equivalent of VB6 Function? Pin
Richard Andrew x6416-Nov-18 9:04
professionalRichard Andrew x6416-Nov-18 9:04 
GeneralRe: C# Equivalent of VB6 Function? Pin
Eddy Vluggen16-Nov-18 10:11
professionalEddy Vluggen16-Nov-18 10:11 
QuestionConverting nested object to JSON Not nested objects Pin
Member 1338930215-Nov-18 23:09
Member 1338930215-Nov-18 23:09 
AnswerRe: Converting nested object to JSON Not nested objects Pin
Richard Deeming16-Nov-18 1:02
mveRichard Deeming16-Nov-18 1:02 
AnswerRe: Converting nested object to JSON Not nested objects Pin
Nathan Minier16-Nov-18 1:23
professionalNathan Minier16-Nov-18 1:23 
Questionupdate option not functioning in gridview Pin
Stephanie Joanne15-Nov-18 16:38
Stephanie Joanne15-Nov-18 16:38 
protected void OnRowEditing(object sender, GridViewEditEventArgs e)
        {
            GridView1.EditIndex = e.NewEditIndex;
            this.BindGrid();
        }

        protected void OnRowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            GridViewRow row = GridView1.Rows[e.RowIndex];
            int Id = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Values[0]);
            string site = (row.FindControl("txtSite") as TextBox).Text;
            string fake = (row.FindControl("txtFake") as TextBox).Text;
            string query = "UPDATE Sites SET Sites=@Site, Fake=@Fake WHERE id=@id";
            string constr = "Data Source=LAPTOP-01LEC0RG;Persist Security Info=False;Integrated Security=SSPI;Initial Catalog=BlackList;User Id=sa;Password=blacklist;Connect Timeout=30;";
            using (SqlConnection con = new SqlConnection(constr))
            {
                using (SqlCommand cmd = new SqlCommand(query))
                {
                    cmd.Parameters.AddWithValue("@id", Id);
                    cmd.Parameters.AddWithValue("@Site", site);
                    cmd.Parameters.AddWithValue("@fake", fake);
                    cmd.Connection = con;
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }




This is my code. my update option does not function when i click edit.
QuestionRe: update option not functioning in gridview Pin
Richard MacCutchan15-Nov-18 21:44
mveRichard MacCutchan15-Nov-18 21:44 
SuggestionRe: update option not functioning in gridview Pin
Richard Deeming16-Nov-18 0:59
mveRichard Deeming16-Nov-18 0:59 
QuestionIntegrating multi-threading into this application. Are there any issues you can see arising from this? Pin
Goalie3515-Nov-18 10:50
Goalie3515-Nov-18 10:50 
AnswerRe: Integrating multi-threading into this application. Are there any issues you can see arising from this? Pin
Luc Pattyn15-Nov-18 11:12
sitebuilderLuc Pattyn15-Nov-18 11:12 
QuestionDetect Network / VPN Connection Part 2 Pin
Kevin Marois15-Nov-18 6:46
professionalKevin Marois15-Nov-18 6:46 
AnswerRe: Detect Network / VPN Connection Part 2 Pin
Richard MacCutchan15-Nov-18 10:14
mveRichard MacCutchan15-Nov-18 10:14 
GeneralRe: Detect Network / VPN Connection Part 2 Pin
Kevin Marois15-Nov-18 10:21
professionalKevin Marois15-Nov-18 10:21 
GeneralRe: Detect Network / VPN Connection Part 2 Pin
Richard MacCutchan15-Nov-18 10:27
mveRichard MacCutchan15-Nov-18 10:27 
GeneralRe: Detect Network / VPN Connection Part 2 Pin
Kevin Marois15-Nov-18 10:42
professionalKevin Marois15-Nov-18 10:42 
GeneralRe: Detect Network / VPN Connection Part 2 Pin
Richard MacCutchan15-Nov-18 10:54
mveRichard MacCutchan15-Nov-18 10:54 
GeneralRe: Detect Network / VPN Connection Part 2 Pin
Kevin Marois15-Nov-18 11:07
professionalKevin Marois15-Nov-18 11:07 
AnswerRe: Detect Network / VPN Connection Part 2 Pin
Nitin S28-Dec-18 1:34
professionalNitin S28-Dec-18 1:34 
QuestionHow to copy also subfolders and their files from an certain folder? Pin
Member 1405587915-Nov-18 4:24
Member 1405587915-Nov-18 4:24 
QuestionRe: How to copy also subfolders and their files from an certain folder? Pin
Richard MacCutchan15-Nov-18 6:04
mveRichard MacCutchan15-Nov-18 6:04 
AnswerRe: How to copy also subfolders and their files from an certain folder? Pin
Luc Pattyn15-Nov-18 8:01
sitebuilderLuc Pattyn15-Nov-18 8:01 
QuestionParsing JSon Pin
pkfox15-Nov-18 3:57
professionalpkfox15-Nov-18 3:57 
AnswerRe: Parsing JSon Pin
OriginalGriff15-Nov-18 4:13
mveOriginalGriff15-Nov-18 4:13 

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.