Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: passing a variable from a web form to a user control


Message #1 by "Nick Charlesworth" <nick@f...> on Thu, 8 Aug 2002 10:13:22
"Nick Charlesworth" wrote:
try this URL

http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=323


> 
>  Hi, 
> 
> I am building a user control that will form the header
> of my sites pages - 
> header.ascx 
> 
> I want to declare a page title in the web form and
have
> the header user 
> control display this title in between the
> &lt;title&gt;&lt;/title&gt; tags that are in 
> the header user control.
> 
> How can I pass a variable from the webform i.e.
> strTitle to be included 
> in the user control.
> 
> My header.ascx user control currently looks like this 
> 
> &lt;%@ Control Language=&quot;vb&quot;
AutoEventWireup=&quot;false&quot; 
> Codebehind=&quot;header.ascx.vb&quot;
Inherits=&quot;woodmoore.header&quot; 
> &lt;html&gt; 
> &lt;head&gt; 
> &lt;link rel=&quot;stylesheet&quot;
type=&quot;text/css&quot;
> href=&quot;mystyle.css&quot;&gt; 
> &lt;title&gt;&lt;!--insert the title string here
--&gt;&lt;/title&gt; 
> &lt;meta name=&quot;keywords&quot;
content=&quot;&quot;&gt; 
> &lt;meta name=&quot;description&quot;
content=&quot;&quot;&gt; 
> &lt;/head&gt; 
> &lt;body bgcolor=&quot;#ffffff&quot;&gt; 
> &lt;!--END HEADER --&gt; 
> 
> thanks for your time, 
> 
> Nick 
> <a
href="http://mail.telocity.com//jump/http://p2p.wrox.com/manager.asp">http://p2p.wrox.com/manager.asp</a> or 

  Return to Index