Handling Multiple Result (Shapes) from SPROCs
Handling Multiple Result Shapes from SPROCs [Function(Name = “spGetWebAccount”)] [ResultType(typeof(Client))] [ResultType(typeof(User))] [ResultType(typeof(UA_User))] public IMultipleResults spGetWebAccount(System.Nullable<Int64> ClientID, System.Nullable<Int64> UserID) { IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), ClientID, UserID); return (IMultipleResults)result.ReturnValue; } Source : http://weblogs.asp.net/scottgu/archive/2007/08/16/linq-to-sql-part-6-retrieving-data-using-stored-procedures.aspx
Exposing an event handler as a control property
You need to expose it as full-blown event, not as property. Page parser in ASP.NET is then able to wire syntax On=”handler_method_name” into your event as listener. #region Event Handlers public delegate void OnAddressSavedHandler(object sender, AddressEventArgs e); public class AddressEventArgs : EventArgs { public Int64 AddressID; public AddressEventArgs(){ } public AddressEventArgs(Int64 val) { AddressID = […]
[.NET] Use IIS Express instead ASP.NET Development Server (Cassini)
Tutorial in French Download link
[HowTo] Use jQuery with Aspx UpdatePanel (datepicker Sample code inside)
As the update panel is going to reload the contents of the html. You’ll have to listen for the UpdatePanel to complete and recreate the datepicker. Here is a very basic sample. This doesn’t take into account multiple update panels on your page or potential memory leaks from not properly destroying your datepicker. Another thing […]
How to disable copy paste and autocomplete for an HTML textbox
Use the following events : onCopy onPaste onDrag onDrop Autocomplete Like this : <INPUT size=12 name=”FundsTransferTo” maxlength=12 onCopy=”return false” onDrag=”return false” onDrop=”return false” onPaste=”return false” autocomplete=off> Source
[jQuery] how to put a link in a fancybox title
http://www.devppl.com/forum/post64655.html <a title=”text about the project :: <a href=’http://www.someclient.com’>Launch website</a>” href=”delete/big.png”><img src=”delete/thumb.png” alt=”” width=”115″ height=”115″ /></a> $(‘a.gallery’).fancybox({ ‘titlePosition’ : ‘inside’ });
[LINQ] The query results cannot be enumerated more than once (using databinding…)
When you bind the ISingleResultfor the first time, the results are enumerated and the data object is populated. When you bind the same ISingleResult instance to the same control again, it detects that the data-source is the same as its last source (by comparing their object references) and does not enumerate the ISingleResult instance for […]