Ask a Question related to ASP.NET General, Design and Development.
-
Kevin Spencer #1
Re: Dynamically change HTML (PARAM) value in VB.NET
Did you create an HtmlGenericControl in your CodeBehind class that the
client-side control could inherit?
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
[url]http://www.takempis.com[/url]
Big things are made up
of lots of little things
"VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
news:#xZHuhuRDHA.3132@tk2msftngp13.phx.gbl...I> I have an <OBJECT> control on my webform with the Id/Name of 'MyControl'.want> looked at the HTML and it has a bunch of PARAM values. The PARM value I> to change is called "Value_21".
>
> How do I dynamically set this PARAM value through VB.NET code? (I want to
> avoid ALL scripting if possible.)
>
> (I did add "runat='server'" to the OBJECT tag, but it still seems
> inaccessible through the codebehind.)
>
> Thanks.
>
>
>
Kevin Spencer Guest
-
Change Content Dynamically
I'm trying to find a way to change the contents of a table (calendar) that I have nested in a DIV. without loading a new page. In other words, go... -
Change DataNavigateUrlField dynamically
Hi guys, let's see if someone can give me a small hand with this.... i'm populating a dataset that sometimes changes 1 or 2 columns depending on... -
Dynamically change URL in Web Service
Dear Al I am now also facing a problem on changing URL in web reference. Firstly, i added a web reference in my project, and then i change the... -
dynamically change
I need to know how to modify the <asp:BoundColumn/> to N/A when the datafield value comes in as negative quantity and color it different on the... -
Change Param Tags Dynamically
Does anyone know of a good way (any way, really) of changing <param> or <embed> tag value dynamically? This would be really incredibly helpful. Any... -
VB Programmer #2
Re: Dynamically change HTML (PARAM) value in VB.NET
Well, I tried this: "Dim MyControl as new HtmlGenericControl" (same name as
the OBJECT). Is this what you mean? Can you clarify?
BTW, putting "runat='server'" on this OBJECT creates some wierd GUID error
so I had to remove this.
"Kevin Spencer" <kevinDIESPAMMERSDIE@takempis.com> wrote in message
news:uJIPLcvRDHA.1720@TK2MSFTNGP12.phx.gbl...'MyControl'.> Did you create an HtmlGenericControl in your CodeBehind class that the
> client-side control could inherit?
>
> --
> HTH,
>
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> [url]http://www.takempis.com[/url]
> Big things are made up
> of lots of little things
>
> "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
> news:#xZHuhuRDHA.3132@tk2msftngp13.phx.gbl...> > I have an <OBJECT> control on my webform with the Id/Name ofto> I> want> > looked at the HTML and it has a bunch of PARAM values. The PARM value I> > to change is called "Value_21".
> >
> > How do I dynamically set this PARAM value through VB.NET code? (I want>> > avoid ALL scripting if possible.)
> >
> > (I did add "runat='server'" to the OBJECT tag, but it still seems
> > inaccessible through the codebehind.)
> >
> > Thanks.
> >
> >
> >
>
VB Programmer Guest
-
VB Programmer #3
Re: Dynamically change HTML (PARAM) value in VB.NET
Here's the HTML for the OBJECT:
<OBJECT id="MyNiKnob1" style="WIDTH: 144px; HEIGHT: 120px"
Classid="clsid:D9..." name="MyNiKnob1" VIEWASTEXT>
<PARAM NAME="_Version" VALUE="393218">
<PARAM NAME="_ExtentX" VALUE="3810">
<PARAM NAME="_ExtentY" VALUE="3175">
<PARAM NAME="Value_21" VALUE="0">
</OBJECT>
Here's my Page_Load event (trying to change PARAM value 'Value_21'):
Dim MyNiKnob As New HtmlGenericControl("MyNiKnob")
MyNiKnob.Attributes.Add("Value_21", "64")
Am I close?
Robert
"Kevin Spencer" <kevinDIESPAMMERSDIE@takempis.com> wrote in message
news:uJIPLcvRDHA.1720@TK2MSFTNGP12.phx.gbl...'MyControl'.> Did you create an HtmlGenericControl in your CodeBehind class that the
> client-side control could inherit?
>
> --
> HTH,
>
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> [url]http://www.takempis.com[/url]
> Big things are made up
> of lots of little things
>
> "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
> news:#xZHuhuRDHA.3132@tk2msftngp13.phx.gbl...> > I have an <OBJECT> control on my webform with the Id/Name ofto> I> want> > looked at the HTML and it has a bunch of PARAM values. The PARM value I> > to change is called "Value_21".
> >
> > How do I dynamically set this PARAM value through VB.NET code? (I want>> > avoid ALL scripting if possible.)
> >
> > (I did add "runat='server'" to the OBJECT tag, but it still seems
> > inaccessible through the codebehind.)
> >
> > Thanks.
> >
> >
> >
>
VB Programmer Guest
-
Kevin Spencer #4
Re: Dynamically change HTML (PARAM) value in VB.NET
Try this (at the class level, along with the other field declarations):
Protected MyControl As HtmlGenericControl
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
[url]http://www.takempis.com[/url]
Big things are made up
of lots of little things
"VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
news:e6WGggvRDHA.1920@TK2MSFTNGP11.phx.gbl...as> Well, I tried this: "Dim MyControl as new HtmlGenericControl" (same nameI> the OBJECT). Is this what you mean? Can you clarify?
>
> BTW, putting "runat='server'" on this OBJECT creates some wierd GUID error
> so I had to remove this.
>
> "Kevin Spencer" <kevinDIESPAMMERSDIE@takempis.com> wrote in message
> news:uJIPLcvRDHA.1720@TK2MSFTNGP12.phx.gbl...> 'MyControl'.> > Did you create an HtmlGenericControl in your CodeBehind class that the
> > client-side control could inherit?
> >
> > --
> > HTH,
> >
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > [url]http://www.takempis.com[/url]
> > Big things are made up
> > of lots of little things
> >
> > "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
> > news:#xZHuhuRDHA.3132@tk2msftngp13.phx.gbl...> > > I have an <OBJECT> control on my webform with the Id/Name of> > I> > > looked at the HTML and it has a bunch of PARAM values. The PARM value> to> > want> > > to change is called "Value_21".
> > >
> > > How do I dynamically set this PARAM value through VB.NET code? (I want>> >> > > avoid ALL scripting if possible.)
> > >
> > > (I did add "runat='server'" to the OBJECT tag, but it still seems
> > > inaccessible through the codebehind.)
> > >
> > > Thanks.
> > >
> > >
> > >
> >
>
Kevin Spencer Guest
-
Kevin Spencer #5
Re: Dynamically change HTML (PARAM) value in VB.NET
I just reviewed your last message. You have to include the runat=server
attribute in the tag in the page. The tag and the CodeBehind class must be
the same. The id attribute of the tag must match the name you give to your
field declaration. The Page inherits from the CodeBehind. I am able to
create a server-side OBJECT tag. What error are you getting?
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
[url]http://www.takempis.com[/url]
Big things are made up
of lots of little things
"VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
news:e6EoFEwRDHA.3132@tk2msftngp13.phx.gbl...name> First, I tried this (in the Class level):
> Protected MyNiKnob1 As HtmlGenericControl
> An exception was thrown: Object reference not set to an instance of an
> object.
>
> Then I tried this:
> Protected MyNiKnob1 As New HtmlGenericControl("MyNiKnob1")
> The value did not change.
>
> BTW, in Page_Load I still have: MyNiKnob1.Attributes.Add("Value_21", "64")
>
> Any ideas?
>
> Thanks again.
>
> "Kevin Spencer" <kevinDIESPAMMERSDIE@takempis.com> wrote in message
> news:eala79vRDHA.3880@tk2msftngp13.phx.gbl...> > Try this (at the class level, along with the other field declarations):
> >
> > Protected MyControl As HtmlGenericControl
> >
> > --
> > HTH,
> >
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > [url]http://www.takempis.com[/url]
> > Big things are made up
> > of lots of little things
> >
> > "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
> > news:e6WGggvRDHA.1920@TK2MSFTNGP11.phx.gbl...> > > Well, I tried this: "Dim MyControl as new HtmlGenericControl" (samethe> error> > as> > > the OBJECT). Is this what you mean? Can you clarify?
> > >
> > > BTW, putting "runat='server'" on this OBJECT creates some wierd GUID> > > so I had to remove this.
> > >
> > > "Kevin Spencer" <kevinDIESPAMMERSDIE@takempis.com> wrote in message
> > > news:uJIPLcvRDHA.1720@TK2MSFTNGP12.phx.gbl...
> > > > Did you create an HtmlGenericControl in your CodeBehind class that> value> > > > client-side control could inherit?
> > > >
> > > > --
> > > > HTH,
> > > >
> > > > Kevin Spencer
> > > > .Net Developer
> > > > Microsoft MVP
> > > > [url]http://www.takempis.com[/url]
> > > > Big things are made up
> > > > of lots of little things
> > > >
> > > > "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
> > > > news:#xZHuhuRDHA.3132@tk2msftngp13.phx.gbl...
> > > > > I have an <OBJECT> control on my webform with the Id/Name of
> > > 'MyControl'.
> > > > I
> > > > > looked at the HTML and it has a bunch of PARAM values. The PARM> want> > I> > > > want
> > > > > to change is called "Value_21".
> > > > >
> > > > > How do I dynamically set this PARAM value through VB.NET code? (I>> >> > > to
> > > > > avoid ALL scripting if possible.)
> > > > >
> > > > > (I did add "runat='server'" to the OBJECT tag, but it still seems
> > > > > inaccessible through the codebehind.)
> > > > >
> > > > > Thanks.
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
Kevin Spencer Guest
-
David Waz... #6
Re: Dynamically change HTML (PARAM) value in VB.NET
<object ..... >
<asp:PlaceHolder id="phVersion" runat=server>
....
</object>
CODE-BEHIND...
dim x as new Literalcontrol("<Param Name=""_Version"" Value=""" & some_Value
& """>")
phVersion.controls.add(x)
"VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
news:uMwwAkvRDHA.1624@tk2msftngp13.phx.gbl...I> Here's the HTML for the OBJECT:
> <OBJECT id="MyNiKnob1" style="WIDTH: 144px; HEIGHT: 120px"
> Classid="clsid:D9..." name="MyNiKnob1" VIEWASTEXT>
> <PARAM NAME="_Version" VALUE="393218">
> <PARAM NAME="_ExtentX" VALUE="3810">
> <PARAM NAME="_ExtentY" VALUE="3175">
> <PARAM NAME="Value_21" VALUE="0">
> </OBJECT>
>
> Here's my Page_Load event (trying to change PARAM value 'Value_21'):
> Dim MyNiKnob As New HtmlGenericControl("MyNiKnob")
> MyNiKnob.Attributes.Add("Value_21", "64")
>
> Am I close?
>
> Robert
>
> "Kevin Spencer" <kevinDIESPAMMERSDIE@takempis.com> wrote in message
> news:uJIPLcvRDHA.1720@TK2MSFTNGP12.phx.gbl...> 'MyControl'.> > Did you create an HtmlGenericControl in your CodeBehind class that the
> > client-side control could inherit?
> >
> > --
> > HTH,
> >
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > [url]http://www.takempis.com[/url]
> > Big things are made up
> > of lots of little things
> >
> > "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
> > news:#xZHuhuRDHA.3132@tk2msftngp13.phx.gbl...> > > I have an <OBJECT> control on my webform with the Id/Name of> > I> > > looked at the HTML and it has a bunch of PARAM values. The PARM value> to> > want> > > to change is called "Value_21".
> > >
> > > How do I dynamically set this PARAM value through VB.NET code? (I want>> >> > > avoid ALL scripting if possible.)
> > >
> > > (I did add "runat='server'" to the OBJECT tag, but it still seems
> > > inaccessible through the codebehind.)
> > >
> > > Thanks.
> > >
> > >
> > >
> >
>
David Waz... Guest
-
VB Programmer #7
Re: Dynamically change HTML (PARAM) value in VB.NET
"runat=server" doesn't work on my page for this control. It gives me this
error:
Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: Guid should contain 32 digits with 4 dashes
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
Source Error:
Line 27: Be sure to substitute the GetKnobValue argument with the
appropriate number.
Line 28: -->
Line 29: <OBJECT id="MyNiKnob1" runat=server style="WIDTH: 128px;
HEIGHT: 112px" classid="clsid:D940E4D2-6079-11CE-88CB-0020AF6845F6"
Line 30: name="MyNiKnob1" VIEWASTEXT>
Line 31: <PARAM NAME="_Version" VALUE="393218">
Source File: c:\inetpub\wwwroot\POWERWeb\OfficeViewAc.aspx Line: 29
"David Waz..." <dlw@pickpro.com> wrote in message
news:AlEPa.180$jd2.96932957@newssvr11.news.prodigy .com...some_Value> <object ..... >
> <asp:PlaceHolder id="phVersion" runat=server>
> ...
> </object>
> CODE-BEHIND...
> dim x as new Literalcontrol("<Param Name=""_Version"" Value=""" &value> & """>")
>
> phVersion.controls.add(x)
>
>
>
> "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
> news:uMwwAkvRDHA.1624@tk2msftngp13.phx.gbl...> > Here's the HTML for the OBJECT:
> > <OBJECT id="MyNiKnob1" style="WIDTH: 144px; HEIGHT: 120px"
> > Classid="clsid:D9..." name="MyNiKnob1" VIEWASTEXT>
> > <PARAM NAME="_Version" VALUE="393218">
> > <PARAM NAME="_ExtentX" VALUE="3810">
> > <PARAM NAME="_ExtentY" VALUE="3175">
> > <PARAM NAME="Value_21" VALUE="0">
> > </OBJECT>
> >
> > Here's my Page_Load event (trying to change PARAM value 'Value_21'):
> > Dim MyNiKnob As New HtmlGenericControl("MyNiKnob")
> > MyNiKnob.Attributes.Add("Value_21", "64")
> >
> > Am I close?
> >
> > Robert
> >
> > "Kevin Spencer" <kevinDIESPAMMERSDIE@takempis.com> wrote in message
> > news:uJIPLcvRDHA.1720@TK2MSFTNGP12.phx.gbl...> > 'MyControl'.> > > Did you create an HtmlGenericControl in your CodeBehind class that the
> > > client-side control could inherit?
> > >
> > > --
> > > HTH,
> > >
> > > Kevin Spencer
> > > .Net Developer
> > > Microsoft MVP
> > > [url]http://www.takempis.com[/url]
> > > Big things are made up
> > > of lots of little things
> > >
> > > "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
> > > news:#xZHuhuRDHA.3132@tk2msftngp13.phx.gbl...
> > > > I have an <OBJECT> control on my webform with the Id/Name of> > > I
> > > > looked at the HTML and it has a bunch of PARAM values. The PARMwant> I> > > want
> > > > to change is called "Value_21".
> > > >
> > > > How do I dynamically set this PARAM value through VB.NET code? (I>> > to> >> > > > avoid ALL scripting if possible.)
> > > >
> > > > (I did add "runat='server'" to the OBJECT tag, but it still seems
> > > > inaccessible through the codebehind.)
> > > >
> > > > Thanks.
> > > >
> > > >
> > > >
> > >
> > >
> >
>
VB Programmer Guest



Reply With Quote

