locked
creating a resizablecontrolextender from code behind RRS feed

  • Question

  • User1463647503 posted

    hi i trying to create a Resizablecontrol extender from code behind.

    everything works fine including css and others.

    but when i tried to add

    oncliendresizing

    it is not working. i cant just add the javascript function name to the control

     Dim rs As New ResizableControlExtender
    
     rs.TargetControlID = label.ID
            rs.ID = label.Text & 66
            rs.HandleCssClass = "handlecss"
            rs.ResizableCssClass = "resizablecss"
    
            rs.OnClientResize("onResize")
    'onResize is my javascript function
    'i am having error for this line of code.
    'wat should i put in this?he is asking for index as char.
            rs.MinimumHeight = 30
            rs.MinimumWidth = 20
            rs.HandleOffsetX = 0
            rs.HandleOffsetY = 0

    Sunday, March 23, 2014 10:55 PM

Answers

  • User-933407369 posted

    hi,

    OnClientResize property is value type instead of method,  the onResize is a javascript function which is need to be defined in advance.

    so you should assign a value , seems like below:

    Dim rs As New ResizableControlExtender
    
     rs.TargetControlID = label.ID
            rs.ID = label.Text & 66
            rs.HandleCssClass = "handlecss"
            rs.ResizableCssClass = "resizablecss"
    
            rs.OnClientResize="onResize"
    'onResize is my javascript function 'i am having error for this line of code. 'wat should i put in this?he is asking for index as char. rs.MinimumHeight = 30 rs.MinimumWidth = 20 rs.HandleOffsetX = 0 rs.HandleOffsetY = 0

    it is working for me , i hope it helps you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 24, 2014 10:08 PM

All replies

  • User-933407369 posted

    hi,

    OnClientResize property is value type instead of method,  the onResize is a javascript function which is need to be defined in advance.

    so you should assign a value , seems like below:

    Dim rs As New ResizableControlExtender
    
     rs.TargetControlID = label.ID
            rs.ID = label.Text & 66
            rs.HandleCssClass = "handlecss"
            rs.ResizableCssClass = "resizablecss"
    
            rs.OnClientResize="onResize"
    'onResize is my javascript function 'i am having error for this line of code. 'wat should i put in this?he is asking for index as char. rs.MinimumHeight = 30 rs.MinimumWidth = 20 rs.HandleOffsetX = 0 rs.HandleOffsetY = 0

    it is working for me , i hope it helps you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 24, 2014 10:08 PM
  • User1463647503 posted

    thanks. it solved my problem

    Monday, March 24, 2014 10:24 PM