Standard-Proxy des Internet Explorer verwenden

by Michael R. Albertin 25. February 2011 14:15

Folgende Methode erlaubt das Verwenden des Standard-Proxys des Internet Explorers ...

public static IWebProxy GetSystemWebProxy()

Gibt einen Proxy zurück, der mit den Internet Explorer-Einstellungen des Benutzers konfiguriert ist, dessen Identität gerade verwendet wird.
http://msdn.microsoft.com/de-de/library/system.net.webrequest.getsystemwebproxy.aspx

Tags:

Asp.Net | Web

Data Dirty Warning

by Michael R. Albertin 28. February 2009 17:38

This is a Panel Extender for ASP.NET AJAX 1.0 that automatically detects if any input control inside it was changed and shows an alert if the user tries to leave the page before saving the data. The extender supports most HTML input controls and can detect whether either data, selection or both have changed.

http://www.codeproject.com/KB/ajax/ajaxdirtypanelextender.aspx

 

Daten vor dem Update in die Datenquelle aufbereiten

by Michael R. Albertin 28. February 2009 17:37

Daten vor dem Update in die Datenquelle aufbereiten.

protected void fwUser_ItemUpdating(object sender, FormViewUpdateEventArgs e)
{
   if (e.OldValues["loginPwd"].Equals(e.NewValues["loginPwd"]))
     e.NewValues["loginPwd"] = null;
   else
     e.NewValues["loginPwd"] = EncryptPwd(e.NewValues["loginName"].ToString(), e.NewValues["loginPwd"].ToString()); 
}

Checkboxen und DataId aus Grid auslesen

by Michael R. Albertin 28. February 2009 17:34

Fills a range of Checkbox-Values to the temporary datastorage.

/// <summary>
/// Fills a range of Checkbox-Values to the temporary datastorage.
/// </summary>
/// <param name="rows">The GridViewRows containing the values</param>
/// <param name="idLabelName">the Control-ID of the label containing the id (must be an int!)</param>
/// <param name="checkBoxName">the Control-ID of the checkbox containing the boolean value</param>
public void AddRange(GridViewRowCollection rows, string idLabelName, string checkBoxName)
{
   for (int i = 0; i < rows.Count; i++)
     {
       bool value = ((CheckBox)rows[i].FindControl(checkBoxName)).Checked;
       int id = -1;
       if (int.TryParse(((Label)rows[i].FindControl(idLabelName)).Text, out id))
         Add(id, value);
     }
}

Bestätigungs-Dialog

by Michael R. Albertin 28. February 2009 17:12

Öffnet ein Bestätigungs-Dialog im Browser.

Button btn = new Button();
btn.OnClientClick = "return confirm('Wirklich ? ')";  

Tags:

Asp.Net

Info-Popup anzeigen

by Michael R. Albertin 28. February 2009 17:09

Öffnet ein Info-Popup im Browser

String csname1 = "PopupScript";
Type cstype = this.GetType(); 
ClientScriptManager cs = Page.ClientScript; 
if (!cs.IsStartupScriptRegistered(cstype, csname1))  {
      String cstext1 = "alert('Standardbenachrichtigungen wurden erfolgreich erstellt');";
      cs.RegisterStartupScript(cstype, csname1, cstext1, true);  }

Tags:

Asp.Net

Timeout

by Michael R. Albertin 28. February 2009 17:08

Maximal zulässige Ladezeit einer Webseite über die web.config festlegen

<system.web>
   <httpRuntime executionTimeout="2000" />
</system.web>
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012 Syntax Error