473,386 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Friendly Url

I must make a web project. It's a dynamic web site with 3 template and the page content is in a database.
So I have a Url www.mysite.com/template1.aspx?IdPage=2

This is not good if I send a link of any page

Can I make something with .net ( c# ) to intercept someone as www.mysite.com/channel1/page.htm so I can search in my database for the IdPage and return the page?

www.mysite.com/channel1/page.htm not exist is a virtual Page!
The client browse my website with Friendly Url, but all stay on a Db.

I hope you undestand something e you can help me.
Bye
Nov 18 '05 #1
7 1309
I have try to do this with a httpmodule, but if the client search for www.mysite.com/channel/pagina.htm, the browser say "the page not exists", the IIS write a error. It's work only if the page exists on my web site, but this is not my case.

"avnrao" wrote:
you can write HttpModule to do the job..
google on writing HttpModules..you will get lot of examples.

Av.
"Boni" <Bo**@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
I must make a web project. It's a dynamic web site with 3 template and the
page content is in a database.
So I have a Url www.mysite.com/template1.aspx?IdPage=2

This is not good if I send a link of any page

Can I make something with .net ( c# ) to intercept someone as
www.mysite.com/channel1/page.htm so I can search in my database for the
IdPage and return the page?

www.mysite.com/channel1/page.htm not exist is a virtual Page!
The client browse my website with Friendly Url, but all stay on a Db.

I hope you undestand something e you can help me.
Bye


Nov 18 '05 #2
"Boni" <Bo**@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
I have try to do this with a httpmodule, but if the client search for www.mysite.com/channel/pagina.htm, the browser say "the page not exists",
the IIS write a error. It's work only if the page exists on my web site, but
this is not my case.

This is because the .htm extension isn't being handled by ASP.NET, but by
IIS. You have to add a mapping from .htm to ASP.NET. Look at the virtual
directory properties, click Configuration and check the mappings. You'll
want to add one for .htm which is like the one for .aspx.
--
John Saunders
johnwsaundersiii at hotmail

"avnrao" wrote:
you can write HttpModule to do the job..
google on writing HttpModules..you will get lot of examples.

Av.
"Boni" <Bo**@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
I must make a web project. It's a dynamic web site with 3 template and thepage content is in a database.
So I have a Url www.mysite.com/template1.aspx?IdPage=2

This is not good if I send a link of any page

Can I make something with .net ( c# ) to intercept someone as
www.mysite.com/channel1/page.htm so I can search in my database for the IdPage and return the page?

www.mysite.com/channel1/page.htm not exist is a virtual Page!
The client browse my website with Friendly Url, but all stay on a Db.

I hope you undestand something e you can help me.
Bye


Nov 18 '05 #3
i tried a simple prototype on this..
in Application_BeginRequest of Global.asax i have this code

if(Request.Path.ToLower().IndexOf("dummypage") > -1)
Server.Transfer("WebForm1.aspx",true);

and it works only for file extensions that are handled by aspnet_isapi.dll.
in your case .HTM is not handled by this dll..hence your handler is not
getting fired.
try changing it to aspx..can you do that??

hth,
Av.

"Boni" <Bo**@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
I have try to do this with a httpmodule, but if the client search for
www.mysite.com/channel/pagina.htm, the browser say "the page not exists",
the IIS write a error. It's work only if the page exists on my web site,
but this is not my case.

"avnrao" wrote:
you can write HttpModule to do the job..
google on writing HttpModules..you will get lot of examples.

Av.
"Boni" <Bo**@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
>I must make a web project. It's a dynamic web site with 3 template and
>the
>page content is in a database.
> So I have a Url www.mysite.com/template1.aspx?IdPage=2
>
> This is not good if I send a link of any page
>
> Can I make something with .net ( c# ) to intercept someone as
> www.mysite.com/channel1/page.htm so I can search in my database for the
> IdPage and return the page?
>
> www.mysite.com/channel1/page.htm not exist is a virtual Page!
> The client browse my website with Friendly Url, but all stay on a Db.
>
> I hope you undestand something e you can help me.
> Bye


Nov 18 '05 #4
you can write HttpModule to do the job..
google on writing HttpModules..you will get lot of examples.

Av.
"Boni" <Bo**@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
I must make a web project. It's a dynamic web site with 3 template and the
page content is in a database.
So I have a Url www.mysite.com/template1.aspx?IdPage=2

This is not good if I send a link of any page

Can I make something with .net ( c# ) to intercept someone as
www.mysite.com/channel1/page.htm so I can search in my database for the
IdPage and return the page?

www.mysite.com/channel1/page.htm not exist is a virtual Page!
The client browse my website with Friendly Url, but all stay on a Db.

I hope you undestand something e you can help me.
Bye

Nov 18 '05 #5
> I have try to do this with a httpmodule, but if the client search for
www.mysite.com/channel/pagina.htm

Since you're making friendly URLs, I'd go a step further and drop the .htm
completely.

-Darrel
Nov 18 '05 #6
I have mapping the htm,html to and now is the asp.net process that say my "Impossible to find the page ". In the mapping options I have uncheck the option "Verify if the page exixsts" ( I have the italian version of IIS and I don't know if this is right translate ), but don't work! It's say that tha page not exists and this is true but I wont intercept this.

thank's for your answers and for your help

"John Saunders" wrote:
"Boni" <Bo**@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
I have try to do this with a httpmodule, but if the client search for

www.mysite.com/channel/pagina.htm, the browser say "the page not exists",
the IIS write a error. It's work only if the page exists on my web site, but
this is not my case.

This is because the .htm extension isn't being handled by ASP.NET, but by
IIS. You have to add a mapping from .htm to ASP.NET. Look at the virtual
directory properties, click Configuration and check the mappings. You'll
want to add one for .htm which is like the one for .aspx.
--
John Saunders
johnwsaundersiii at hotmail

"avnrao" wrote:
you can write HttpModule to do the job..
google on writing HttpModules..you will get lot of examples.

Av.
"Boni" <Bo**@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
>I must make a web project. It's a dynamic web site with 3 template and the >page content is in a database.
> So I have a Url www.mysite.com/template1.aspx?IdPage=2
>
> This is not good if I send a link of any page
>
> Can I make something with .net ( c# ) to intercept someone as
> www.mysite.com/channel1/page.htm so I can search in my database for the > IdPage and return the page?
>
> www.mysite.com/channel1/page.htm not exist is a virtual Page!
> The client browse my website with Friendly Url, but all stay on a Db.
>
> I hope you undestand something e you can help me.
> Bye


Nov 18 '05 #7
"Boni" <Bo**@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
I have mapping the htm,html to and now is the asp.net process that say my "Impossible to find the page ". In the mapping options I have uncheck the
option "Verify if the page exixsts" ( I have the italian version of IIS and
I don't know if this is right translate ), but don't work! It's say that tha
page not exists and this is true but I wont intercept this.
thank's for your answers and for your help
Your HttpModule isn't working at all? Does it get called for .aspx pages but
not for the .htm pages?
--
John Saunders
johnwsaundersiii at hotmail
"John Saunders" wrote:
"Boni" <Bo**@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
I have try to do this with a httpmodule, but if the client search for

www.mysite.com/channel/pagina.htm, the browser say "the page not exists", the IIS write a error. It's work only if the page exists on my web site, but this is not my case.

This is because the .htm extension isn't being handled by ASP.NET, but by IIS. You have to add a mapping from .htm to ASP.NET. Look at the virtual
directory properties, click Configuration and check the mappings. You'll
want to add one for .htm which is like the one for .aspx.
--
John Saunders
johnwsaundersiii at hotmail

"avnrao" wrote:

> you can write HttpModule to do the job..
> google on writing HttpModules..you will get lot of examples.
>
> Av.
> "Boni" <Bo**@discussions.microsoft.com> wrote in message
> news:D7**********************************@microsof t.com...
> >I must make a web project. It's a dynamic web site with 3 template and
the
> >page content is in a database.
> > So I have a Url www.mysite.com/template1.aspx?IdPage=2
> >
> > This is not good if I send a link of any page
> >
> > Can I make something with .net ( c# ) to intercept someone as
> > www.mysite.com/channel1/page.htm so I can search in my database
for the
> > IdPage and return the page?
> >
> > www.mysite.com/channel1/page.htm not exist is a virtual Page!
> > The client browse my website with Friendly Url, but all stay on a

Db. > >
> > I hope you undestand something e you can help me.
> > Bye
>
>
>


Nov 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: techy techno | last post by:
Hiii Hello.. I just wanted to know if anyone can tell me how can I give my website visitors the feature of "FRIENDLY PRINTING" through IE. I would definitely like to give a feature like...
7
by: Paul | last post by:
I thought this is more of an IE issue but i've had no joy on that group perhaps somebody here will have a clue. If i click a link to a web page embedded in Excel (97 OR 2000) i get the standard...
1
by: weiwei | last post by:
HI I am having a problem with print friendly function with asp, I have download some code regard with print friendly, it works fine with static html information, however, I have the dynamic pages...
4
by: ST | last post by:
Hi, I'm implementing a printer friendly feature for all the pages on a web site. I'm separating the header, content, and footer into separate ascx files, which are contained in the main file. ...
1
by: Matt_Matt | last post by:
My application has a blank freindly name in the windows firewall exception list when windows automatically registers it via user prompt that says: Do you want to keep blocking this program? ...
4
by: Matt Mercer | last post by:
Hi, I have a asp .net/VB web app that does the typical submitting and retrieving from a SQL database. I am lost as to how I should create a print friendly page for the data. Here is the...
2
by: Ron | last post by:
Hello, I am working on a registration application for my companies intranet. The intranet is ASP classic based as of now. Unfortunately I only know ASP.NET. But that was all okay until I decided I...
2
by: Sandy | last post by:
Hello - I tried to google this, but got back every page on the whole entire web that has printer friendly versions . . . I have a panel containing text from a repeater that also contains text...
1
by: Dave Rado | last post by:
Hi A while ago I discovered a way of creating css pseudo-frames, that offer users the important benefits of real frames (i.e. the navigation remains visible when you scroll down the page), but...
15
by: Prisoner at War | last post by:
Okay, I'd like to create a print-friendly website, so I've been reading up on how to create print-friendly pages (without duplicating my site, of course, by having separate versions of each...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.