473,769 Members | 6,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ajaxtoolkit - slider control not rendering from ajax tab control

1 New Member
Hi Folks,

Slider control is driving me nuts, below is the code from my test page's page load event, nothing great about code, I have a place holder control into which I am adding a table which has three rows with a slider control in each row created dynamically. The problems what I have are

1) handler image does not get displayed, I have set the handleImageUrl and have moved the handlecssclass and railcssclass into local style sheet
2) bound control always defaults to 0, instead of displaying 0, 1 and 2 in the three instances as per the loop variable. Though for a breif period it does show 0 ,1 & 2 respectively but gets reset to 0 immediately upon completing load event.
3) When I view source for the aspx, html input tag for the bound textbox has a value other than 0

If I set the value for the textbox which is extended I get error on liine 194 and further proceeding raises error saying handler was not added through dom.addhandler method.

any idea what is causing the problem, your help is greatly appreciated. I am using visual studio 2008, .net 2.0 with ajax tool kit version v1.0.61025

I have not given the entire code, actually the siders will be added to a ajax tab panel in a user control.

Regards,
Santhosh
Expand|Select|Wrap|Line Numbers
  1. Dim tbl As Table = New Table() 
  2. tbl.Width = System.Web.UI.WebControls.Unit.Percentage(100)
  3.  
  4. For i As Integer = 0 To 2 
  5. Dim tr As TableRow = New TableRow()
  6.  
  7. Dim scell As TableCell = New TableCell() 
  8. Dim txtSlider As TextBox = New TextBox()
  9.  
  10. txtSlider.ID = "txt" & i txtSlider.Style.Add("right", "0px") 
  11. txtSlider.AutoPostBack = "true"
  12.  
  13. txtSlider.Height = WebControls.Unit.Pixel(15)
  14.  
  15. 'scell.CssClass = "scoreGrid"
  16.  
  17. scell.Controls.Add(txtSlider)
  18.  
  19. Dim sbCell As TableCell = New TableCell()Dim txtSlider_Bound As TextBox = New TextBox() 
  20. txtSlider_Bound.Width = WebControls.Unit.Pixel(30)
  21.  
  22. txtSlider_Bound.Height = WebControls.Unit.Pixel(15)
  23.  
  24. 'txtSlider_Bound.ReadOnly = "true"
  25.  
  26. txtSlider_Bound.AutoPostBack = "true"
  27.  
  28. txtSlider_Bound.ID = "txtBound" & i 
  29. txtSlider_Bound.Text = i
  30.  
  31. AddHandler txtSlider.TextChanged, AddressOf txtSlider_TextChanged 
  32. sbCell.Controls.Add(txtSlider_Bound)
  33.  
  34. Dim extender As AjaxControlToolkit.SliderExtender = New AjaxControlToolkit.SliderExtender() extender.ID = "ext" & i 
  35. extender.Minimum = "0"
  36.  
  37. extender.Maximum = "100"
  38.  
  39. extender.Steps = "0"
  40.  
  41. extender.Length = 500
  42.  
  43. extender.RaiseChangeOnlyOnMouseUp = "true"
  44.  
  45. extender.BehaviorID = txtSlider.ID
  46.  
  47. extender.TargetControlID = txtSlider.ID
  48.  
  49. extender.BoundControlID = txtSlider_Bound.ID
  50.  
  51. extender.Orientation = AjaxControlToolkit.SliderOrientation.Horizontal
  52.  
  53. extender.EnableHandleAnimation = "true"
  54.  
  55. extender.HandleCssClass = "Slider_handle"
  56.  
  57. extender.RailCssClass = "slider_rail"
  58.  
  59. extender.HandleImageUrl = Server.MapPath("~/Images/slider_h_handle.gif") 
  60. sbCell.Controls.Add(extender)
  61.  
  62. tr.Controls.Add(scell)
  63.  
  64. tr.Controls.Add(sbCell)
  65.  
  66. tbl.Rows.Add(tr)
  67.  
  68. Next
  69.  
  70. ph.Controls.Add(tbl)
Oct 30 '08 #1
0 2917

Sign in to post your reply or Sign up for a free account.

Similar topics

1
6867
by: Jason Charalambides | last post by:
I need to assign a slider to determine a percentage value for a certain variable in my program. I decided to use a slider so that the user will be able to manually set a value between 0.000... to 1.000 for that variable. The problem for me is how do I associate the slider to that variable? Do I need to write something specific within that or do I just give the slider control the name of the variable that it shall control? Thank you J.C.
2
3564
by: Paul Helmuth | last post by:
All, I am trying to assess how much work it is going to be to "port" my current Visual Studio 6.0 applications to dotNet. It seems like many things that should be trivial are really problematic. I'm sure this mostly (but not completely) due to my lack of experience with dotNet. Anyway, the latest "trivial" issue concerns the Slider ActiveX control from
0
1908
by: Brian Henry | last post by:
Ok I've never implemented a snap location before so I dont really know what im doing wrong here... anyways, I am making a custom slider control that takes dates as its values instead of integers... then taking that date range and finding dates specifiec between them (in a list of dates) and putting snap marks, so if you slide it near one of them it should snap to that tick, but that part i cant figure out. the rest seems ok so far... here...
1
2295
by: Israel | last post by:
The problem: I want to know, definitively when a slider loses focus after a user has started sliding and hasn't released the mouse yet. It appears that this is captured with the WM_ACTIVATEAPP message but this only goes to the form and I want it in the user control that maybe very much removed from the form's knowledge; i.e. the form may launch a 3rd party form that, upon a call back, decides to launch other form that has my user control...
15
3548
by: eladla | last post by:
Hi! I am creating a composite control the does some of it`s own data access. I want to display a progress bar between the time the page is loaded and the control place holder is displayed and final display of the data from the database. I was thinking of manually opening a second thread in the Render method, but nothing is displayed before the render method exits anyway. Anyone know of a good way to do this? I have been working on this...
1
11570
by: =?Utf-8?B?dGhlamFja29mYWxs?= | last post by:
Please help. I am getting the following error when I attempt to use AJAX in a web page. <%@ Page Language="C#" MasterPageFile="~/Master/Master1.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="MyApp_Default" Title="Space" %> <%@ Register TagPrefix="ajaxToolkit" Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" %>
3
1609
by: ma | last post by:
Hello, I download AJAXToolKit today and install it and configured my MSVC 2005 to use it. But there is no TabPanle control in it. I had an installation some month ago and it had TabPanel control in it. Can you please help me to find if it is a bug in AJAXToolKit You can help me by downloading the toolkit today and installing it and seeing if there is any TabPanel in the toolkit? I check everything and it seems that I am installing it...
1
4626
by: =?Utf-8?B?aUhhdkFRdWVzdGlvbg==?= | last post by:
I have downloaded ajax and this part of the code works fine in my new sample website <ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" /> <asp:TextBox ID="txtTelerik" runat="server"></asp:TextBox> <asp:Button ID="btnTelerik" runat="server" Text="Show" /> <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" CssClass="radcalendar" PopupButtonID="btnTelerik" Format="MMMM d, yyyy"...
1
2192
by: Mel | last post by:
Anyone know how to capture an event when the slider changes? Is this possible with this control or is there a different control I should consider instead? I want to use a slider to allow the user to rotate an object on the screen from 0 to 360 degrees. Upon changing the slider the object would rotate. (using Asp.net 2.0, visual studio 2005, vb.net, WinXP Pro SP2)
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7408
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.