|
|
|
date: Fri, 29 Aug 2008 09:58:07 -0400,
group: microsoft.public.dotnet.framework.aspnet
back
Re: Convert vb to javascript?
your javascript coudl make an ajax call to get the session value, then add a
css rule, but why bother. why don't you convert the html page to aspx, or map
.htm to asp.net so you can set the theme.
-- bruce (sqlwork.com)
"_Who" wrote:
> Isn't there a way around that. Maybe do save something additional when I
> save the session varable that will be available on the client side.
>
> What about the rest of the code. Is it possible to convert that to
> javascript?
>
> Thanks
>
>
>
> Dim objCSS As HtmlLink = New HtmlLink()
>
> Select Case colorIndex
>
> Case Is = 0, 1
>
> objCSS.Attributes.Add("href", "App_Themes/Backgroundblack.css") '
> Session["Stylesheet"].ToString())
>
> Case Is = 2
>
> objCSS.Attributes.Add("href", "App_Themes/Backgroundwhite.css")
>
> Case Is = 3
>
> objCSS.Attributes.Add("href", "App_Themes/Backgroundtextured.css")
>
> End Select
>
> objCSS.Attributes.Add("rel", "stylesheet")
>
> objCSS.Attributes.Add("type", "text/css")
>
> HeadMaster.Controls.Add(objCSS)
>
>
>
> "Mark Rae [MVP]" wrote in message
> news:eXKHtGeCJHA.2480@TK2MSFTNGP02.phx.gbl...
> > "_Who" wrote in message
> > news:%23UUtE9dCJHA.4576@TK2MSFTNGP05.phx.gbl...
> >
> >> I have an .htm file that shows in an iframe which is part of a master's
> >> asp:Content.
> >>
> >> But I don't know how to extract from Session("StyleSheetIndex"); rather
> >> than set it. And all the rest!
> >>
> >> Can this be done in JavaScript?
> >
> > No. JavaScript is client-side - it can't interrogate Session variables
> > because Session is server-side...
> >
> >
> > --
> > Mark Rae
> > ASP.NET MVP
> > http://www.markrae.net
>
>
>
date: Fri, 29 Aug 2008 08:18:00 -0700
author: bruce barker
|
|