load the upload control dynamically

Last post 06-13-2009, 4:03 AM by ian pettman. 5 replies.
Sort Posts: Previous Next
  •  06-11-2009, 9:21 AM 53002

    load the upload control dynamically

    Hi
    I have the upload control working on a page. I am now trying to load it dynamically. However the cancel and insert buttons css appear to be read only. How do I set these dynamically please?
     
    <attempted code>

    Dim CuteWebUIUploader As New CuteWebUI.Uploader

    CuteWebUIUploader.ID = "Uploader" & sRowId

    CuteWebUIUploader.InsertText = "Upload file"

    'CuteWebUIUploader.CancelButtonStyle = "Button"

    'CuteWebUIUploader.InsertButtonStyle = "Button"

    divTextPostCode.Controls.Add(CuteWebUIUploader)

     


    CPHAddressTest.Controls.Add(divAddress)

    </attempted code>

    <html to be generated>

    '<div id="CuteWebUI">

    ' <div>

    ' <CuteWebUI:Uploader runat="server" ID="Uploader1" InsertText="Upload File" CancelButtonStyle-CssClass="Button"

    ' InsertButtonStyle-CssClass="Button">

    ' <ValidateOption MaxSizeKB="1024" />

    ' <InsertButtonStyle CssClass="Button"></InsertButtonStyle>

    ' <CancelButtonStyle CssClass="Button"></CancelButtonStyle>

    ' </CuteWebUI:Uploader>

    ' </div>

    '</div>


    Ian Pettman
    Ava producers of leading Temp Agency Software
    Filed under:
  •  06-11-2009, 10:08 PM 53045 in reply to 53002

    Re: load the upload control dynamically

    Hi,
     
    You can try the uploader.InsertButton.Style or other propertis.
     
    uploader.InsertButton, uploader.CancelButton is an asp.net button object.
     
    Regards,
    Terry
     
  •  06-12-2009, 7:05 AM 53067 in reply to 53045

    Re: load the upload control dynamically

    That displays as readonly on my form as well
     
    CuteWebUIUploader.InsertButton.Style = "button"
     
    In that case is it something with the build i have???
     
     

    Ian Pettman
    Ava producers of leading Temp Agency Software
  •  06-12-2009, 7:35 AM 53068 in reply to 53067

    Re: load the upload control dynamically

    however ...
    CuteWebUIUploader.CancelButton.Style.Value = "Button"
    does not cive a parse error but does give (from my point of view) incorrect html... 

    value="Upload file" id="ctl00_CPH1_Uploader7__Insert" style="button" /><div id="ctl00_CPH1_Uploader7__Progress"

    as opposed to a statically declared control:
    value
    ="Upload File" id="ctl00_CPH1_Uploader1__Insert" class="Button" /><div id="ctl00_CPH1_Uploader1__Progress"

    so how should i set the style dynamically??


    Ian Pettman
    Ava producers of leading Temp Agency Software
  •  06-12-2009, 8:25 AM 53070 in reply to 53068

    Re: load the upload control dynamically

    Hi,
     
    That should be
     
    .CancelButton.CssClass="Button"
     
    Regards,
    Terry
     
  •  06-13-2009, 4:03 AM 53110 in reply to 53070

    Re: load the upload control dynamically

    Hi Terry, thank you
     
    obvious when you know...
     
    Ian
     

    Ian Pettman
    Ava producers of leading Temp Agency Software
View as RSS news feed in XML