by bryian
24. February 2010 15:28
I have an AJAX MultiHandleSliderExtender Control and ToolkitScriptManager on the web page and everything work fine. Then I decided to include a Master Page to it, at runtime, I received the following errors
Message: Invalid character
Line: 1
Char: 3
Code: 0
URI: http://download.ysatech.com/MultiHandleSliderExtender_w_Chart/default2.aspx?_...
Message: 'AjaxControlToolkit' is undefined
Line: 182
Char: 5
Code: 0
This is a very weird error, the page work fine without the present of a Master Page. I started to look around and found the solution here. The solution is to set the "CombineScripts" property of the ToolkitScriptManager to false.
<ajaxToolkit:ToolkitScriptManager runat="server" ID="ajaxScriptManager" EnablePartialRendering="true" CombineScripts="false" />
by bryian
24. February 2010 14:49
I have an AJAX MultiHandleSliderExtender Control on the web page and everything work fine. Then I decided to include a Master Page to it, at runtime, I received the client-side error "Microsoft JScript runtime error 'null' is null or not an object".
This is a very weird error, the page work fine without the present of a Master Page. I started to look around and found out that the value of the ID and BehaviorID have to be identical. If you happen to come across the same error, give this solution a try. It work for me.
<cc1:MultiHandleSliderExtender ID="MultiHandleSliderExtender1" runat="server" ShowHandleDragStyle="true"
BehaviorID="MultiHandleSliderExtender1" TargetControlID="txtSlider" Length="500" ShowInnerRail="true"
EnableMouseWheel="false" OnClientDrag="Drag" Increment="1" OnClientDragStart="DragStart"
RaiseChangeOnlyOnMouseUp="true" EnableRailClick="false"
OnClientDragEnd="DragEnd"
ShowHandleHoverStyle="true" Maximum="222" Minimum="1">
<MultiHandleSliderTargets>
<cc1:MultiHandleSliderTarget ControlID="rangeStart" />
<cc1:MultiHandleSliderTarget ControlID="rangeEnd" />
</MultiHandleSliderTargets>
</cc1:MultiHandleSliderExtender>
by bryian
7. February 2010 16:50
I was working with the AJAX MultiHandleSliderExtender control, the thing that bother me the most is the error listed below at design time. The code didn't throw any error at runtime.
Error Creating Control - MultiHandleSliderExtender1
'cc1:MultiHandleSliderExtender could not be set on property MultiHandleSliderTargets'
Here is the markup code
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<cc1:MultiHandleSliderExtender ID="MultiHandleSliderExtender2" runat="server">
<MultiHandleSliderTargets>
<cc1:MultiHandleSliderTarget ControlID="someID" />
</MultiHandleSliderTargets>
</cc1:MultiHandleSliderExtender>
After looking into the source code carefully, I noticed that the MultiHandleSliderTargets control is missing a TagPrefix next to it. Placing the TagPrefix "cc1:MultiHandleSliderTargets" has solved the problem.
by bryian
9. January 2010 09:14
I was working on one of the VB.NET application that have been developed several years ago and I saw some declaration like Str7 = objDr.GetString(7).ToString, Str8 = objDr.GetString(8).ToString, Str9 = objDr.GetString(9).ToString and so on. It puzzled me, what will happen if the value in the column 7, 8, or 9 is null. Then, I went in to the SQL database, pull out the table and changed the value to null. And I received this error "
Data is Null. This method or property cannot be called on Null values.
" If you happen to come across this situation, below is the work around.
If (Not objDr(8) Is DBNull.Value) Then
Str8 = Trim(objDr.GetString(8).ToString)
End If