Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using slashes as querystring

Reply
Thread Tools

Using slashes as querystring

 
 
Nils N
Guest
Posts: n/a
 
      02-05-2004
Is there anyone her who knows how to use slashes as querystring. What
I want to do is using the url:

http://localhost/urltest/?id=23423ea342

to appear as

http://localhost/urltest/23423ea342

I am using C#.net.

Any help will be greatly appreciated

Regard
Nils
 
Reply With Quote
 
 
 
 
George Ter-Saakov
Guest
Posts: n/a
 
      02-05-2004
It's easy.
You will need to use HttpContext.RewriteUrl in Application_BeginRequest in
Global.asax

There are 2 gotchas you need to be aware.

1. You have to use absolute path for all images, CSS, ... (I hope you
understand why)
2. If you are using 2000 then you must have somewhere extension aspx.
Because under 2000 the request will not be routed to ASP.NET. So it must be
like that http://localhost/urltest.aspx/23423ea342


George.

"Nils N" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Is there anyone her who knows how to use slashes as querystring. What
> I want to do is using the url:
>
> http://localhost/urltest/?id=23423ea342
>
> to appear as
>
> http://localhost/urltest/23423ea342
>
> I am using C#.net.
>
> Any help will be greatly appreciated
>
> Regard
> Nils



 
Reply With Quote
 
 
 
 
Nils N
Guest
Posts: n/a
 
      02-08-2004
Perfect

Thanks


"George Ter-Saakov" <(E-Mail Removed)> wrote in message news:<#zZfhx#(E-Mail Removed)>...
> It's easy.
> You will need to use HttpContext.RewriteUrl in Application_BeginRequest in
> Global.asax
>
> There are 2 gotchas you need to be aware.
>
> 1. You have to use absolute path for all images, CSS, ... (I hope you
> understand why)
> 2. If you are using 2000 then you must have somewhere extension aspx.
> Because under 2000 the request will not be routed to ASP.NET. So it must be
> like that http://localhost/urltest.aspx/23423ea342
>
>
> George.
>
> "Nils N" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) om...
> > Is there anyone her who knows how to use slashes as querystring. What
> > I want to do is using the url:
> >
> > http://localhost/urltest/?id=23423ea342
> >
> > to appear as
> >
> > http://localhost/urltest/23423ea342
> >
> > I am using C#.net.
> >
> > Any help will be greatly appreciated
> >
> > Regard
> > Nils

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RegEx: odd number of slashes? and too many slashes? Dan Wilkin Perl Misc 1 07-17-2006 03:47 AM
How to get value of QueryString inside QueryString Mehdi ASP .Net 6 04-06-2006 03:41 PM
Passing QueryString URL as a paremeter in QueryString Adeel Ahmad ASP General 1 03-07-2006 02:05 PM
radeditor/dataset/slashes/System.Data.DBConcurrencyException Henrik de Jong ASP .Net 0 06-18-2004 01:20 PM
String replacement( 2 slashes-> 4 slashes ) qazmlp Java 5 04-07-2004 10:26 PM



Advertisments