Website Replication

  • Thread starter Thread starter J
  • Start date Start date
J said:
Does anyone know how to grab a parameter from a url?

Example:

http://tester.com/234

------------------^^^

The 234 is what I am trying to retrieve.

That's not a parameter. It's a directory name (possibly virtual). Parameters
come after a "?":

http://tester.com?id=234

You pick those up in Request.QueryString:

Request.QueryString["id"] // This is the string "234"
 
I would like to treat the /234 as a parameter not a VD.
And it is replication, the (234) of http://test.com/234
is the id of the person/entity's replicated site. If it
was me i would use the querystring but this is the way it
has to be. Is there a was to get this?
 
J said:
I would like to treat the /234 as a parameter not a VD.
And it is replication, the (234) of http://test.com/234
is the id of the person/entity's replicated site. If it
was me i would use the querystring but this is the way it
has to be. Is there a was to get this?

Not only isn't there a way to get it, but I don't see how the above URL will
ever cause your code to execute. How will you get a .aspx page to be called
when there's no filename on the command line? What resource will be
accessed?
 
How sites like that are typically done is you have to either write your own
ISAPI filter to capture anything that doesn't have a file extension or a /
at the end - and process it like real asp.net file...

Unless there is some compelling reason, it would probably be better off on
many levels to just do: /users.aspx?UserID=234
 

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

Back
Top