css file can't grab querystring

D

darrel

I'm building a CMS that has various controls that grab various values from
the querystring.

Those all work just fine.

However, one of my files is actually a CSS file. It's an ASPX file that
dynamically writes out the CSS. It's loaded as you would any CSS file (from
a link tag).

The catch is that from this aspx page, I can not grab the querystring. I'm
guessing, because it's not the actual ASPX page that is loading everything
else.

The solution that I came up with is to convert this to a usercontrol, then
load the usercontrol in my HEAD tags, and just have it write out inline CSS
for me.

However, I was wondering if there's another option that wouldn't require me
to do the inline response.write. Is there anyway to grab the querystring
from this aspx page?

-Darrel
 
G

Guest

You could write the appropriate query string parameters and values in a new
query string that you would append to the link for the css/aspx file.

Ex:

<LINK REL="stylesheet" TYPE="text/css" HREF="styles.aspx?<%= "userId=" &
Request.QueryString("userId") & "&userName=" &
Request.QueryString("userName") %>">
 
D

darrel

You could write the appropriate query string parameters and values in a
new
query string that you would append to the link for the css/aspx file.

Oh, duh! Wonderful solution!

_Darrel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top