protected void Page_Load(object sender, EventArgs e) { try { if (String.IsNullOrEmpty(Request.QueryString["q"])) { LoadDocument(); } else { SearchDocumentByTagName(); } } catch (IndexOutOfRangeException ex) { ErrorLoging.WriteLog(String.Format("Message: {0}\nTarget: {1}\nDetails: {2}", ex.Message, ex.TargetSite, ex.StackTrace), System.Diagnostics.EventLogEntryType.Error); } catch (NullReferenceException ex) { ErrorLoging.WriteLog(String.Format("Message: {0}\nTarget: {1}\nDetails: {2}", ex.Message, ex.TargetSite, ex.StackTrace), System.Diagnostics.EventLogEntryType.Error); } catch (Exception ex) { ErrorLoging.WriteLog(String.Format("Message: {0}\nTarget: {1}\nDetails: {2}", ex.Message, ex.TargetSite, ex.StackTrace), System.Diagnostics.EventLogEntryType.Error); Response.Redirect("error.aspx"); } }
public override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Create your fragment here AddPreferencesFromResource(Resource.Xml.System_Settings); try { ISharedPreferences d = PreferenceManager.GetDefaultSharedPreferences(MainActivity.context); // getting access from Preference manager PreferenceManager.GetDefaultSharedPreferences(MainActivity.context).RegisterOnSharedPreferenceChangeListener(this); // registerer the preference listner EditTextPreference edittextrange = (EditTextPreference)FindPreference("Default Range"); edittextrange.Text = d.GetString("Default Range", ApplicationSettings.Defualt_Distance_Range.ToString()); edittextrange.Summary = "The Defualt Range for all product searches"; //CheckBoxPreference checkboxvibrate = (CheckBoxPreference)FindPreference("Vibrate"); //checkboxvibrate.Checked = d.GetBoolean("Vibrate", NotificationSettings.Vibrate); //CheckBoxPreference checkboxSound = (CheckBoxPreference)FindPreference("Sound"); //checkboxSound.Checked = d.GetBoolean("Sound", NotificationSettings.Sound); //RingtonePreference rigntone = (RingtonePreference)FindPreference("NotificationRigntone"); //Android.Net.Uri uri = Android.Net.Uri.Parse(d.GetString("NotificationRigntone", RingtoneManager.GetDefaultUri(RingtoneType.Alarm).ToString())); //Ringtone ringtone = RingtoneManager.GetRingtone(MainActivity.context, uri); //String name = ringtone.GetTitle(MainActivity.context); //rigntone.Summary = name; } catch (Exception ex) { ErrorLoging.WriteErrorLog(Constants.StudentObject.Idx, ex.Message, "Student_Settings_Fragment"); } }
protected void Page_Load(object sender, EventArgs e) { //DocumentRatingModel rating = new DocumentRatingModel(); //rating.DocumentAverageRate(2); ErrorLoging.WriteLog("test phat", System.Diagnostics.EventLogEntryType.Information); //DocumentModel docModel = new DocumentModel(); //CallMethodByText(docModel, "GetDocumentById", new object[] { 2 }); //Testing(docModel.GetType(), docModel); //dynamic dym = CallMethodByString("BusinessLogicLayer.DocumentModel", "GetDocumentList"); //String path = new Uri("http://*****:*****@"(page=)\d{1,9}"); String s = rg.Replace(Request.Url.OriginalString, "page=4"); }