Archive for Aprile 24th, 2008

Programatically editing exe.config

CodeKeep C# Feed Aprile 24th, 2008

Description: Update execonfig at run time

Link: http://www.codekeep.net/snippets/37d1fd24-3ade-4464-8f18-ed90c39913ae.aspx

// UPDATE EXE.CONFIG
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

config.AppSettings.Settings["Setting1"].Value = settingValue1;
config.AppSettings.Settings["Setting2"].Value = settingValue2;
config.Save(ConfigurationSaveMode.Modified, false);

// REFRESH CONFIG
ConfigurationManager.RefreshSection("appSettings");
/*
	update app settings
*/

Problems with demo?

maurodx Aprile 24th, 2008

I don’t know if you have problems using the demo software! If you cannot see any signal (demo signals are sent randomly every 2 minutes) please tell me!Anyway, if you don’t receive signals try to close the program and reopen it.There is an icon near the clock with a popup menu if you right-click on it!Mauro

Price list available

maurodx Aprile 24th, 2008

Here you find the “beta” version of the price list for the service.Tell me what you think!See you! Mauro

Bind Java Script Function

CodeKeep C# Feed Aprile 24th, 2008

Description: Bind Java Script function using Row data bound

Link: http://www.codekeep.net/snippets/11d43b77-e5f1-4303-83e3-4d337961a50e.aspx

 protected void grdProfile_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            int UID = 0;
            try
            {
                if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    HtmlAnchor hPhoto = (HtmlAnchor)e.Row.FindControl("aPhoto");
                    UID = Convert.ToInt16(grdProfile.DataKeys[e.Row.RowIndex].Values["UID"]);
                    if (hPhoto != null && UID>0)
                    {
                        hPhoto.Attributes["onclick"] = string.Format("javascript:viewPhoto({0})", UID.ToString());
                    }
                }
            }
            catch (Exception ex)
            {

            }
        }