Saturday, March 24, 2012
passing variables from aspx page to ascx control
on that page can read?
I'd like to set a 'template=' variable that various other controls can see
(the
header, navigation, footer, etc.).
Would simply setting a public variable be enough?
-DarrelYes, it is enough if you have public properties in the aspx page, you can
access those values using "Page" property of user control. Even you can
access all the controls in that page using this property.
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com
"darrel" <notreal@.hotmail.com> wrote in message
news:uOW2qIrPEHA.3748@.TK2MSFTNGP09.phx.gbl...
> Is there a SOP for setting variables on an ASPX page that the usercontrols
> on that page can read?
> I'd like to set a 'template=' variable that various other controls can see
> (the
> header, navigation, footer, etc.).
> Would simply setting a public variable be enough?
> -Darrel
>
>
> Yes, it is enough if you have public properties in the aspx page, you can
> access those values using "Page" property of user control.
Thanks, Saravana!
-Darrel
passing variables from aspx page to ascx control
on that page can read?
I'd like to set a 'template=' variable that various other controls can see
(the
header, navigation, footer, etc.).
Would simply setting a public variable be enough?
-DarrelYes, it is enough if you have public properties in the aspx page, you can
access those values using "Page" property of user control. Even you can
access all the controls in that page using this property.
--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com
"darrel" <notreal@.hotmail.com> wrote in message
news:uOW2qIrPEHA.3748@.TK2MSFTNGP09.phx.gbl...
> Is there a SOP for setting variables on an ASPX page that the usercontrols
> on that page can read?
> I'd like to set a 'template=' variable that various other controls can see
> (the
> header, navigation, footer, etc.).
> Would simply setting a public variable be enough?
> -Darrel
> Yes, it is enough if you have public properties in the aspx page, you can
> access those values using "Page" property of user control.
Thanks, Saravana!
-Darrel
Wednesday, March 21, 2012
Passthrough Authentication?
I am setting up a secured website on an intranet for a client. In order to authenticate to the web page, the client would like to pull the userid and domain from the local workstation. Then I would query a db table to see if that user was in there. The thinking is that if the user is authenticated in the domain, they have access to the website.
So my question is - how do I pull the userid and domain name from the workstation? I'm guessing I'll have to code some java script. However, if there was a way to pull this info from the server, that'd be best.
Anyone know?
Thanks,
PardoTry
Request.ServerVariables("AUTH_USER")hope this helps,
sivilian
Great - will try!