Question: "PARAM" value issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • VB Programmer

    #1

    Question: "PARAM" value issue

    I created a VB6 user control with a ActiveX Knob on it. Here's the simple
    code:
    Public Property Get Value() As Integer
    Value = CWKnob.Value
    End Property
    Public Property Let Value(Value As Integer)
    CWKnob.Value = Value
    lblValue.Captio n = CWKnob.Value
    End Property

    When I put the user control on a webform and look the HTML I don't see
    PARAMs for the "Value" value. All I see is "_ExtentX" and "_ExtentY". I
    need to set this value dynamically through my webform. Here's the HTML
    portion...
    <OBJECT id="ucMyKnob" classid="clsid: 7..." name="ucMyKnob" VIEWASTEXT>
    <PARAM NAME="_ExtentX" VALUE="3228">
    <PARAM NAME="_ExtentY" VALUE="2937">
    </OBJECT>

    1. What do I have to do in the user control so that it will show up as a
    "PARAM"?
    2. In my webform how can I change the value of the user control dynamically
    (by manipulated the PARAM value)?

    Thanks,
    Robert


  • bruce barker

    #2
    Re: Question: &quot;PARAM&quo t; value issue

    1) just edit html and add your parameter

    <OBJECT id="ucMyKnob" classid="clsid: 7..." name="ucMyKnob" VIEWASTEXT>
    <PARAM NAME="_ExtentX" VALUE="3228">
    <PARAM NAME="_ExtentY" VALUE="2937">
    <PARAM NAME="Value" VALUE="49">
    </OBJECT>

    2) there is no direct support in asp.net. you can use a literal html control
    and set the inner html or use <%= %>

    <OBJECT id="ucMyKnob" classid="clsid: 7..." name="ucMyKnob" VIEWASTEXT>
    <PARAM NAME="_ExtentX" VALUE="3228">
    <PARAM NAME="_ExtentY" VALUE="2937">
    <PARAM NAME="Value" VALUE="<%=myVal ue%>">
    </OBJECT>

    "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
    news:OMZcSslRDH A.2116@TK2MSFTN GP12.phx.gbl...[color=blue]
    > I created a VB6 user control with a ActiveX Knob on it. Here's the simple
    > code:
    > Public Property Get Value() As Integer
    > Value = CWKnob.Value
    > End Property
    > Public Property Let Value(Value As Integer)
    > CWKnob.Value = Value
    > lblValue.Captio n = CWKnob.Value
    > End Property
    >
    > When I put the user control on a webform and look the HTML I don't see
    > PARAMs for the "Value" value. All I see is "_ExtentX" and "_ExtentY". I
    > need to set this value dynamically through my webform. Here's the HTML
    > portion...
    > <OBJECT id="ucMyKnob" classid="clsid: 7..." name="ucMyKnob" VIEWASTEXT>
    > <PARAM NAME="_ExtentX" VALUE="3228">
    > <PARAM NAME="_ExtentY" VALUE="2937">
    > </OBJECT>
    >
    > 1. What do I have to do in the user control so that it will show up as a
    > "PARAM"?
    > 2. In my webform how can I change the value of the user control[/color]
    dynamically[color=blue]
    > (by manipulated the PARAM value)?
    >
    > Thanks,
    > Robert
    >
    >[/color]


    Comment

    • VB Programmer

      #3
      Re: Question: &quot;PARAM&quo t; value issue

      BTW I'd like to avoid scripting if possible. Can I set the value of a PARAM
      through VB.NET code on a webform?

      "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
      news:epR5PAuRDH A.2316@tk2msftn gp13.phx.gbl...[color=blue]
      > Thanks. I think I recall using InnerHtml or something to set the value of
      > the PARAM through code. Can someone post an example on how to do this or
      > just let me know?
      >
      > "bruce barker" <nospam_brubar@ safeco.com> wrote in message
      > news:Ob11EBoRDH A.2676@TK2MSFTN GP10.phx.gbl...[color=green]
      > > 1) just edit html and add your parameter
      > >
      > > <OBJECT id="ucMyKnob" classid="clsid: 7..." name="ucMyKnob" VIEWASTEXT>
      > > <PARAM NAME="_ExtentX" VALUE="3228">
      > > <PARAM NAME="_ExtentY" VALUE="2937">
      > > <PARAM NAME="Value" VALUE="49">
      > > </OBJECT>
      > >
      > > 2) there is no direct support in asp.net. you can use a literal html[/color]
      > control[color=green]
      > > and set the inner html or use <%= %>
      > >
      > > <OBJECT id="ucMyKnob" classid="clsid: 7..." name="ucMyKnob" VIEWASTEXT>
      > > <PARAM NAME="_ExtentX" VALUE="3228">
      > > <PARAM NAME="_ExtentY" VALUE="2937">
      > > <PARAM NAME="Value" VALUE="<%=myVal ue%>">
      > > </OBJECT>
      > >
      > > "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
      > > news:OMZcSslRDH A.2116@TK2MSFTN GP12.phx.gbl...[color=darkred]
      > > > I created a VB6 user control with a ActiveX Knob on it. Here's the[/color][/color]
      > simple[color=green][color=darkred]
      > > > code:
      > > > Public Property Get Value() As Integer
      > > > Value = CWKnob.Value
      > > > End Property
      > > > Public Property Let Value(Value As Integer)
      > > > CWKnob.Value = Value
      > > > lblValue.Captio n = CWKnob.Value
      > > > End Property
      > > >
      > > > When I put the user control on a webform and look the HTML I don't see
      > > > PARAMs for the "Value" value. All I see is "_ExtentX" and "_ExtentY".[/color][/color][/color]
      I[color=blue][color=green][color=darkred]
      > > > need to set this value dynamically through my webform. Here's the[/color][/color][/color]
      HTML[color=blue][color=green][color=darkred]
      > > > portion...
      > > > <OBJECT id="ucMyKnob" classid="clsid: 7..." name="ucMyKnob" VIEWASTEXT>
      > > > <PARAM NAME="_ExtentX" VALUE="3228">
      > > > <PARAM NAME="_ExtentY" VALUE="2937">
      > > > </OBJECT>
      > > >
      > > > 1. What do I have to do in the user control so that it will show up[/color][/color][/color]
      as[color=blue]
      > a[color=green][color=darkred]
      > > > "PARAM"?
      > > > 2. In my webform how can I change the value of the user control[/color]
      > > dynamically[color=darkred]
      > > > (by manipulated the PARAM value)?
      > > >
      > > > Thanks,
      > > > Robert
      > > >
      > > >[/color]
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...