“System.OutOfMemoryException: Out of memory” When using Image.FromFile(imageFile)

When I was populating an System.Drawing.Image object from a folder of images I revceived the following error message:"System.OutOfMemoryException: Out of memory"At first I thought I had a very large image…

Continue Reading“System.OutOfMemoryException: Out of memory” When using Image.FromFile(imageFile)

Insert JavaScript before PostBack Event

To call some javascript before the postback event is raised, use the following code:if (!Page.ClientScript.IsOnSubmitStatementRegistered(type, "script_onsubmit_editor_" + ClientID)) {   string popTextareaScript =      "var ed = YAHOO.widget.EditorInfo.getEditorById('" + editor.ClientID + "');"      + "ed.cleanHTML();";    Page.ClientScript.RegisterOnSubmitStatement(type,…

Continue ReadingInsert JavaScript before PostBack Event