Geeks With Blogs

Michael Freidgeim's Blog MS .Net Development May 2008 Entries
Make your web page more printer-friendly
Below there are a few links describing how to Make your web page more printer-friendly Page dimensions : print :Maximum width = 560 pixels CSS Media Types Create Print-Friendly Pages - Save print.css in the same directory as the file, include the <link rel="stylesheet" type="text/css" href="print.css" media="print" /> complete css guide - Printing CSS and Printing describes Page Break <STYLE TYPE="text/css"> P.breakhere {page-break-before: always} </STYLE> This then will be the ......

Posted On Friday, May 30, 2008 6:55 PM

MOM error- "BounceService: Service start of OnePoint failed. Error: 10"
Today our MOM 2000 stopped working. Looking on MOM Esrver local eventlog we found that every few minutes OnePoint starts , than we have message "BounceService: Service start of OnePoint failed. Error: 10" and it stops. Attempt to start OnePoint manually didn't succeeded. I was able to find workaround based on info from article http://www.huntland.co.uk/D... To start OnePoint service I had to disable rule for "Agents Consolidators or Data Access Servers" (full path ......

Posted On Wednesday, May 28, 2008 12:08 AM

Naming Guidelines: Names for embedded Enum and Property of the enum type
Property Naming Guidelines recommends to consider creating a property with the same name as its underlying type. For example, if you declare a property named Color, the type of the property should likewise be Color. Enumeration Type Naming Guidelines recommends do not use an Enum suffix on Enum type names. I found this recommendation conflicting if I want to declare Enum within class and have a property of the type of this enum. I've tried to create something like the following:. public class Control ......

Posted On Tuesday, May 27, 2008 12:52 AM

Is it possible to convert Workflow to Custom composite activity?
I am reading about Windows Workflow and have a question: If I created a workflow with a few activities (While,If etc) and want to convert it to custom composite activity with ability to insert new activities inside blocks, how can I do it? Analogy in ASP.NET is strightforward- just a few steps(see How to: Convert Web Forms Pages into ASP.NET User Controls ) . Is something similar available for WF? Related links how to write Custom activities: Creating a Custom Composite Activity – Morgan Skinner's ......

Posted On Friday, May 23, 2008 9:57 AM

RadioButton with Image instead of text
I want to have RadioButton with Image instead of text, that clicking on image the check-box will be selected In the thread it is shown Radio button (without any text) and image on it's side.(but not inside radio-button) <asp:RadioButton ID="RadioButton2" runat="server" GroupName="A1" /><asp:image runat="server" id="Image2" /><br /> Radiobuttonlist Image Setting thread suggests to use code RadioButtonList1.Items.Add(New ListItem("<img src=""" + s + """/>", s)) It will be useful ......

Posted On Friday, May 16, 2008 4:21 PM

New posts of source code about old Asp.net custom controls
I've found in my source code library a few custom ASP.NET controls that could be useful for someone. ASP.NET custom control TextFileViewerControl ASP.NET composite control FromToTextBoxes ASP.NET custom control CheckBoxWithImage My QueryStringHelper class ......

Posted On Friday, May 16, 2008 2:48 PM

Function to Navigate To Named Anchor
Below is a helper function to insert javascript to Navigate To Named Anchor Page should have anchor with the passed name <a name="anchorName"></a... // from http://www.webdeveloper.com... ///<summary>/// ///</summary> ///<param name="page"></param> ///<param name="anchorName"></p... ///<remarks>Page should have anchor with the passed name <a name="anchorName"></a... /// If there are more than one call ......

Posted On Wednesday, May 14, 2008 2:28 PM

Passing parameters in .Net Remoting
It is well known, that in .Net value type parameters are passed by value, and reference type parameters are passed by reference(more detailed and strict description can be found here). I thought(even after a year working with application that extensively uses Remoting) that .Net Remoting calls do the same. But I was wrong! Recently I found that a method with custom class parameter doesn't have one of the properties updated after return, even if it is certainly updated inside the method. I've read ......

Posted On Saturday, May 10, 2008 10:26 PM

use Activator.CreateInstance to dynamically load the concrete class and avoid Circular references
I have a Factory class that creates number of classes to handle different XML responses, returned by Web Service. All of them are derived from some base class GwsResponse and created depending on the top name element name. Previously factory and all created object classes were located in the same DLL. Now we need to increase number of handled responses, but we want new classes to create in separate extension DLL. We are going to use Activator.CreateInstance to dynamically load the concrete class ......

Posted On Monday, May 5, 2008 11:36 PM

Controls with the same name in GridView Templates
I've created the GridView with templates like the following: <asp:TemplateField SortExpression="Date1"> <AlternatingItemTemplate... <asp:CheckBox ID="chkSelected" runat="server" /> </AlternatingItemTemplat... </asp:TemplateField> <asp:TemplateField SortExpression="Date2"> <AlternatingItemTemplate... <asp:CheckBox ID="chkSelected" runat="server" /> </AlternatingItemTemplat... </asp:TemplateField> On runtime it cause the error: Message : Multiple ......

Posted On Monday, May 5, 2008 11:21 PM

Error: control with id ... could not be located or a different control is assigned to the same ID after postback
Our application has the intermittent (not too often,but can be 10-20 per day) errors like the following: An error has occurred because a control with id 'grdComplaints$ctl04$ctl00' could not be located or a different control is assigned to the same ID after postback. If the ID is not assigned, explicitly set the ID property of controls that raise postback events to avoid this error. System.Web.UI.Page.ProcessP... postData, Boolean fBeforeLoad) +877 System.Web.UI.Page.ProcessR... ......

Posted On Monday, May 5, 2008 11:15 PM

TypeLoadExceptionHolder object can be inserted during unsuccessful Bynary Deserialization
I am using Binary Serialization to save and then reload state ot the object. In my post Issues using binary serialization to store object state for unit tests I described why I have to use it and how I tried to avoid versioning problems. I was able to read the object and access different properties of it withowt any warnings, but later, when the object was tried to be stored in Session, I've got the following error: System.Web.HttpException: Unable to serialize the session state. In 'StateServer' ......

Posted On Thursday, May 1, 2008 11:13 PM

Copyright © Michael Freidgeim | Powered by: GeeksWithBlogs.net | Join free