Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Passing some info to a control at runtime.

Reply
Thread Tools

Passing some info to a control at runtime.

 
 
Simon Harvey
Guest
Posts: n/a
 
      07-27-2004
Hi all,

I've made a user control and I need to pass it some information so it knows
what it should display. Can anyone tell me what i need to do to pass it
information via html attributes. eg:

<asp:mycontrol myproperty="true" runat="server"></asp:mycontrol>

I know I can pass it information in my codebehind, but i need to do that
before the controls page load is called.

Many thanks to anyone who can help

Simon


 
Reply With Quote
 
 
 
 
Shiva
Guest
Posts: n/a
 
      07-27-2004
Hi,

Expose a property from your user control (that will receive the info) and
set the value for that property from the HTML markup (using attirubtes) like
how you have given below.

HTH

"Simon Harvey" <sh856531@microsofts_free_email_service.com> wrote in message
news:egyv20#(E-Mail Removed)...
Hi all,

I've made a user control and I need to pass it some information so it knows
what it should display. Can anyone tell me what i need to do to pass it
information via html attributes. eg:

<asp:mycontrol myproperty="true" runat="server"></asp:mycontrol>

I know I can pass it information in my codebehind, but i need to do that
before the controls page load is called.

Many thanks to anyone who can help

Simon



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clear the Render info & change to different info Andrea Williams ASP .Net 2 10-27-2004 10:01 PM
Passing some info to a control at runtime. Simon Harvey ASP .Net 1 07-27-2004 03:42 PM
Passing some info to a control at runtime. Simon Harvey ASP .Net Building Controls 1 07-27-2004 03:42 PM
How to get the Operating System info like ( Wireless info, Wireless connection) Vasanth Perl 0 06-28-2004 08:56 AM
Wanted Info on UK-Info, & WebDesign PeterPan Computer Support 3 11-27-2003 05:32 PM



Advertisments