Web Custom Control Absolute positioning in VS 2008

Discussion in 'ASP .Net Building Controls' started by CaptnKebec, Nov 30, 2007.

  1. CaptnKebec

    CaptnKebec Guest

    Hi all,

    I've built customs controls with VS 2005, now I've recompiled and use them
    in the new VS 2008 but the controls no longer works as for positioning. I
    can't even move them in the designer.
    I've notice that the "me" object in the "render" event on the control no
    longer has values for style("top") or style("left") ect. Thats what I was
    using to position the control. Here's a code snippet of one of my control's
    render event.

    writer.AddStyleAttribute("LEFT", "100px")
    writer.AddStyleAttribute("TOP", "100px")
    writer.AddStyleAttribute("POSITION", "Absolute")
    writer.AddStyleAttribute("Z-INDEX", Me.Style("Z-INDEX"))

    FormatCtl()

    writer.RenderBeginTag("div class=""HQCheckBox"" id='jsObj_" & Me.ID & "'
    name='jsObj_" & Me.ID & "'")

    writer.Write(("<script language=""javascript"">initChkBox('" & Me.ID &
    "');</script>") & vbCr)

    MyBase.RenderContents(writer)

    writer.RenderEndTag()

    ANY IDEAS??
     
    CaptnKebec, Nov 30, 2007
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.