Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Populating a user control's attributes dynamically? Help!


Message #1 by "Oliver, Wells" <WOliver@l...> on Wed, 13 Nov 2002 10:15:19 -0800
I am attempting to call a user control like so:
<grid:supportgrid id="SpecDesign" type="specdesign" partNumber="41108-RE5"
runat="server" />

However, I need the partNumber field to be supplied dynamically, e.g.:
<grid:supportgrid id="SpecDesign" type="specdesign" partNumber='<%#
Request.QueryString["id"] %>' runat="server" />

However, this does not seem to work. Any tips? I don't think I can work with
my control in my code behind, because it doesn't exist as a class or
anything anywhere.

I'm pulling out hairs here :)

Wells Oliver
Web Applications Programmer
Leviton Voice & Data
xxx-xxx-xxxx
http://www.levitonvoicedata.com 

Message #2 by "Jay Warmack" <jwarmack@w...> on Wed, 13 Nov 2002 10:28:16 -0800
Oliver,

It looks like you are using the databinding syntax (<%#
Request.QueryString["id"]  %>) instead of the standard asp syntax (<%
Request.QueryString["id"]  %>

Try that instead.

Jay


----- Original Message -----
From: "Oliver, Wells" <WOliver@l...>
To: "ASP.NET" <aspx@p...>
Sent: Wednesday, November 13, 2002 10:15 AM
Subject: [aspx] Populating a user control's attributes dynamically? Help!


> I am attempting to call a user control like so:
> <grid:supportgrid id="SpecDesign" type="specdesign" partNumber="41108-RE5"
> runat="server" />
>
> However, I need the partNumber field to be supplied dynamically, e.g.:
> <grid:supportgrid id="SpecDesign" type="specdesign" partNumber='<%#
> Request.QueryString["id"] %>' runat="server" />
>
> However, this does not seem to work. Any tips? I don't think I can work
with
> my control in my code behind, because it doesn't exist as a class or
> anything anywhere.
>
> I'm pulling out hairs here :)
>
> Wells Oliver
> Web Applications Programmer
> Leviton Voice & Data
> xxx-xxx-xxxx
> http://www.levitonvoicedata.com
>
>
>

Message #3 by "Oliver, Wells" <WOliver@l...> on Wed, 13 Nov 2002 14:44:00 -0800
This doesn't work, throws the error that server tags cannot use <% %>
constructs.

This is driving me nuts! Any way to pass dynamic properties to user
controls???!

-----Original Message-----
From: Jay Warmack [mailto:jwarmack@w...] 
Sent: Wednesday, November 13, 2002 10:28 AM
To: ASP.NET
Subject: [aspx] Re: Populating a user control's attributes dynamically?
Help!


Oliver,

It looks like you are using the databinding syntax (<%#
Request.QueryString["id"]  %>) instead of the standard asp syntax (<%
Request.QueryString["id"]  %>

Try that instead.

Jay


----- Original Message -----
From: "Oliver, Wells" <WOliver@l...>
To: "ASP.NET" <aspx@p...>
Sent: Wednesday, November 13, 2002 10:15 AM
Subject: [aspx] Populating a user control's attributes dynamically? Help!


> I am attempting to call a user control like so: <grid:supportgrid 
> id="SpecDesign" type="specdesign" partNumber="41108-RE5" 
> runat="server" />
>
> However, I need the partNumber field to be supplied dynamically, e.g.: 
> <grid:supportgrid id="SpecDesign" type="specdesign" partNumber='<%# 
> Request.QueryString["id"] %>' runat="server" />
>
> However, this does not seem to work. Any tips? I don't think I can 
> work
with
> my control in my code behind, because it doesn't exist as a class or 
> anything anywhere.
>
> I'm pulling out hairs here :)
>
> Wells Oliver
> Web Applications Programmer
> Leviton Voice & Data
> xxx-xxx-xxxx
> http://www.levitonvoicedata.com
>
>
> ---
> Change your mail options at http://p2p.wrox.com/manager.asp or to 
> unsubscribe send a blank email to 
>



Message #4 by "Paul Riley" <rilez@t...> on Wed, 13 Nov 2002 22:56:26 -0000
Can't you set the part number in the page_load ? Would have thought that
would work fine. 

-----Original Message-----
From: Oliver, Wells [mailto:WOliver@l...] 
Sent: 13 November 2002 22:44
To: ASP.NET
Subject: [aspx] Re: Populating a user control's attributes dynamically ?
Help!

This doesn't work, throws the error that server tags cannot use <% %>
constructs.

This is driving me nuts! Any way to pass dynamic properties to user
controls???!

-----Original Message-----
From: Jay Warmack [mailto:jwarmack@w...] 
Sent: Wednesday, November 13, 2002 10:28 AM
To: ASP.NET
Subject: [aspx] Re: Populating a user control's attributes dynamically?
Help!


Oliver,

It looks like you are using the databinding syntax (<%#
Request.QueryString["id"]  %>) instead of the standard asp syntax (<%
Request.QueryString["id"]  %>

Try that instead.

Jay


----- Original Message -----
From: "Oliver, Wells" <WOliver@l...>
To: "ASP.NET" <aspx@p...>
Sent: Wednesday, November 13, 2002 10:15 AM
Subject: [aspx] Populating a user control's attributes dynamically?
Help!


> I am attempting to call a user control like so: <grid:supportgrid 
> id="SpecDesign" type="specdesign" partNumber="41108-RE5" 
> runat="server" />
>
> However, I need the partNumber field to be supplied dynamically, e.g.:

> <grid:supportgrid id="SpecDesign" type="specdesign" partNumber='<%# 
> Request.QueryString["id"] %>' runat="server" />
>
> However, this does not seem to work. Any tips? I don't think I can 
> work
with
> my control in my code behind, because it doesn't exist as a class or 
> anything anywhere.
>
> I'm pulling out hairs here :)
>
> Wells Oliver
> Web Applications Programmer
> Leviton Voice & Data
> xxx-xxx-xxxx
> http://www.levitonvoicedata.com
>
>
> ---
> Change your mail options at http://p2p.wrox.com/manager.asp or to 
> unsubscribe send a blank email to 
>





Message #5 by "Ken Schaefer" <ken@a...> on Thu, 14 Nov 2002 19:21:01 +1100
Create a property in your user control.
Set the value of the property in Page_Load() (or whatever)

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Oliver, Wells" <WOliver@l...>
Subject: [aspx] Re: Populating a user control's attributes dynamically ?
Help!


: This doesn't work, throws the error that server tags cannot use <% %>
: constructs.
:
: This is driving me nuts! Any way to pass dynamic properties to user
: controls???!
:
: -----Original Message-----
: From: Jay Warmack [mailto:jwarmack@w...]
: Sent: Wednesday, November 13, 2002 10:28 AM
: To: ASP.NET
: Subject: [aspx] Re: Populating a user control's attributes dynamically?
: Help!
:
:
: Oliver,
:
: It looks like you are using the databinding syntax (<%#
: Request.QueryString["id"]  %>) instead of the standard asp syntax (<%
: Request.QueryString["id"]  %>
:
: Try that instead.
:
: Jay
:
:
: ----- Original Message -----
: From: "Oliver, Wells" <WOliver@l...>
: To: "ASP.NET" <aspx@p...>
: Sent: Wednesday, November 13, 2002 10:15 AM
: Subject: [aspx] Populating a user control's attributes dynamically? Help!
:
:
: > I am attempting to call a user control like so: <grid:supportgrid
: > id="SpecDesign" type="specdesign" partNumber="41108-RE5"
: > runat="server" />
: >
: > However, I need the partNumber field to be supplied dynamically, e.g.:
: > <grid:supportgrid id="SpecDesign" type="specdesign" partNumber='<%#
: > Request.QueryString["id"] %>' runat="server" />
: >
: > However, this does not seem to work. Any tips? I don't think I can
: > work
: with
: > my control in my code behind, because it doesn't exist as a class or
: > anything anywhere.
: >
: > I'm pulling out hairs here :)


  Return to Index