I have declared a public variable in my ?.asp.cs file called psServerAddress. I have valued this variable with the address of the current server. Now, I want to pass this variable to a usercontrol.cs so I can create a dynamic url "http:\\[psServerAddress]\.....
The user controls are built in a packaged dll included in the project.
From http://www.developmentnow.com/g/8_0_0_0_0_0/dotnet-framework-aspnet.ht
Michael Nemtsev - 06 Oct 2007 07:54 GMT
Hello 66Chawgerdsniegon@sais.com,
put your variably into the session and read it from your user control.
it's the simplest way
---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
> I have declared a public variable in my ?.asp.cs file called
> psServerAddress. I have valued this variable with the address of the
[quoted text clipped - 9 lines]
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
Peter Bromberg [C# MVP] - 06 Oct 2007 19:13 GMT
If it is really a usercontrol (not a custom control, or "server" control) it
should have a Page property that provides you with a reference to the
containing Page class.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
> I have declared a public variable in my ?.asp.cs file called psServerAddress. I have valued this variable with the address of the current server. Now, I want to pass this variable to a usercontrol.cs so I can create a dynamic url "http:\\[psServerAddress]\.....
>
[quoted text clipped - 4 lines]
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com